Browse Source

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

Prevent a rare crash when a status' root node is undefined
closed-social-glitch-2
David Yip 6 years ago
committed by GitHub
parent
commit
cfdbb36bdf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      app/javascript/flavours/glitch/components/status.js

+ 5
- 0
app/javascript/flavours/glitch/components/status.js 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 () {

Loading…
Cancel
Save