From f9a338b473e181dd725f9185d09394624088efac Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Fri, 15 Feb 2019 01:03:01 +0900 Subject: [PATCH] Fix breaks when opening a reply tree in WebUI (#10046) fix #10045 --- app/javascript/mastodon/components/status.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index 386404b574..3e98d374b8 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -86,7 +86,7 @@ class Status extends ImmutablePureComponent { // Track height changes we know about to compensate scrolling 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 () { @@ -99,7 +99,7 @@ class Status extends ImmutablePureComponent { // Compensate height changes 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) { this.didShowCard = true; if (snapshot !== null && this.props.updateScrollBottom) {