diff options
author | David Yip <yipdw@member.fsf.org> | 2018-06-02 16:19:06 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-02 16:19:06 -0500 |
commit | cfdbb36bdf06de01b6701e667cc986fd701efe3c (patch) | |
tree | 41f54f2802e5a759c5ac43de3390aac61eb13820 /app/javascript/flavours/glitch/components/status.js | |
parent | a641d1b5b8e9f20104ab16e5419e6dee4e5af37f (diff) | |
parent | 893f2aff2052b0809c70afac8a27b3e164635b44 (diff) |
Merge pull request #519 from ThibG/glitch-soc/fixes/status-node-null
Prevent a rare crash when a status' root node is undefined
Diffstat (limited to 'app/javascript/flavours/glitch/components/status.js')
-rw-r--r-- | app/javascript/flavours/glitch/components/status.js | 5 |
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 () { |