From 0174ca8679b97efc60b47fb69d45ee95cf3defe2 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sat, 26 May 2018 19:21:02 +0200 Subject: [PATCH] Prevent a rare crash when a status' root node is undefined --- app/javascript/flavours/glitch/components/status.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index c937052661..a90ff491e5 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 () {