From: rinsuki <428rinsuki+git@gmail.com> Date: Thu, 14 Feb 2019 16:03:01 +0000 (+0900) Subject: Fix breaks when opening a reply tree in WebUI (#10046) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=f9a338b473e181dd725f9185d09394624088efac;p=mastodon.git Fix breaks when opening a reply tree in WebUI (#10046) fix #10045 --- diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index 386404b57..3e98d374b 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) {