summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrinsuki <428rinsuki+git@gmail.com>2019-02-15 01:03:01 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-02-17 19:49:38 +0100
commit5aa147b67d7b9e4ef1dc322a1ab1e40bfc35efd2 (patch)
tree527bd2d2cf596b0d86a5cf60fd2c1b468fc4da26
parent77a71236ade04edfce8dc5ee98a8d2ff7a064e15 (diff)
Fix breaks when opening a reply tree in WebUI (#10046)
fix #10045
-rw-r--r--app/javascript/mastodon/components/status.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js
index fde8e60a423..6f64e17c09b 100644
--- a/app/javascript/mastodon/components/status.js
+++ b/app/javascript/mastodon/components/status.js
@@ -85,7 +85,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 () {
@@ -98,7 +98,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) {