Merge pull request #519 from ThibG/glitch-soc/fixes/status-node-null

Prevent a rare crash when a status' root node is undefined
This commit is contained in:
David Yip 2018-06-02 16:19:06 -05:00 committed by GitHub
commit cfdbb36bdf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 () {