about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorunarist <m.unarist@gmail.com>2017-05-26 21:07:48 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-26 14:07:48 +0200
commitc6db416ff70724cd19898fdc91feac6f539b10f3 (patch)
tree886d328d38efc1d2e8277cd9745681cbef3fb9ae /app/javascript
parentb00cb2aed3634ad6624e144b99d538eb85c58c12 (diff)
Fix "Cannot read property" on missing status (#3322)
I've found this issue when I clicked replies to muted user on the timeline.

Properties I've removed in here were added with lazy loading using
IntersectionObserver (8e4d1cba), but those statuses are not need to be
tracked anyway because it will be rendered as only empty div.
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/components/status.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js
index 5405ddfd1..a9f9c1b6b 100644
--- a/app/javascript/mastodon/components/status.js
+++ b/app/javascript/mastodon/components/status.js
@@ -111,7 +111,7 @@ class Status extends ImmutablePureComponent {
     const { isHidden } = this.state;
 
     if (status === null) {
-      return <div ref={this.handleRef} data-id={status.get('id')} />;
+      return null;
     }
 
     if (isIntersecting === false && isHidden) {