about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-05-26 19:21:02 +0200
committerThibaut Girka <thib@sitedethib.com>2018-05-31 14:38:29 +0200
commit893f2aff2052b0809c70afac8a27b3e164635b44 (patch)
treea78fe9fd12bc667310806fa40f7027e24e9567c4 /app/javascript/flavours/glitch
parente396fbfe3bf4d2a404e78e73cff1a609dd0a9bfb (diff)
Prevent a rare crash when a status' root node is undefined
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r--app/javascript/flavours/glitch/components/status.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js
index c93705266..a90ff491e 100644
--- a/app/javascript/flavours/glitch/components/status.js
+++ b/app/javascript/flavours/glitch/components/status.js
@@ -153,6 +153,11 @@ export default class Status extends ImmutablePureComponent {
       muted,
       prepend,
     } = this.props;
+
+    // Prevent a crash when node is undefined. Not completely sure why this
+    // happens, might be because status === null.
+    if (node === undefined) return;
+
     const autoCollapseSettings = settings.getIn(['collapsed', 'auto']);
 
     if (function () {