about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorrinsuki <428rinsuki+git@gmail.com>2019-02-15 01:03:01 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-02-14 17:03:01 +0100
commitf9a338b473e181dd725f9185d09394624088efac (patch)
treeda0018f78e5d9be0978b3b41443497cfdfc565fb /app/javascript
parentaa832198750f99303b1555f412e5405954863a63 (diff)
Fix breaks when opening a reply tree in WebUI (#10046)
fix #10045
Diffstat (limited to 'app/javascript')
-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 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) {