mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-21 12:05:07 +01:00
parent
aa83219875
commit
f9a338b473
@ -86,7 +86,7 @@ class Status extends ImmutablePureComponent {
|
|||||||
|
|
||||||
// Track height changes we know about to compensate scrolling
|
// Track height changes we know about to compensate scrolling
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
this.didShowCard = !this.props.muted && !this.props.hidden && this.props.status.get('card');
|
this.didShowCard = !this.props.muted && !this.props.hidden && this.props.status && this.props.status.get('card');
|
||||||
}
|
}
|
||||||
|
|
||||||
getSnapshotBeforeUpdate () {
|
getSnapshotBeforeUpdate () {
|
||||||
@ -99,7 +99,7 @@ class Status extends ImmutablePureComponent {
|
|||||||
|
|
||||||
// Compensate height changes
|
// Compensate height changes
|
||||||
componentDidUpdate (prevProps, prevState, snapshot) {
|
componentDidUpdate (prevProps, prevState, snapshot) {
|
||||||
const doShowCard = !this.props.muted && !this.props.hidden && this.props.status.get('card');
|
const doShowCard = !this.props.muted && !this.props.hidden && this.props.status && this.props.status.get('card');
|
||||||
if (doShowCard && !this.didShowCard) {
|
if (doShowCard && !this.didShowCard) {
|
||||||
this.didShowCard = true;
|
this.didShowCard = true;
|
||||||
if (snapshot !== null && this.props.updateScrollBottom) {
|
if (snapshot !== null && this.props.updateScrollBottom) {
|
||||||
|
Loading…
Reference in New Issue
Block a user