diff --git a/app/soapbox/features/status/index.js b/app/soapbox/features/status/index.js index b53deca44..08135b7f9 100644 --- a/app/soapbox/features/status/index.js +++ b/app/soapbox/features/status/index.js @@ -462,7 +462,7 @@ class Status extends ImmutablePureComponent { return; } - if (prevProps.status && ancestorsIds && ancestorsIds.size > 0) { + if (prevProps.status && ancestorsIds && ancestorsIds.size > 0 && this.node) { const element = this.node.querySelector('.detailed-status'); window.requestAnimationFrame(() => { diff --git a/app/soapbox/features/ui/index.js b/app/soapbox/features/ui/index.js index 92a9623a6..05581ac11 100644 --- a/app/soapbox/features/ui/index.js +++ b/app/soapbox/features/ui/index.js @@ -463,6 +463,7 @@ class UI extends React.PureComponent { handleHotkeyNew = e => { e.preventDefault(); + if (!this.node) return; const element = this.node.querySelector('.compose-form__autosuggest-wrapper textarea'); @@ -473,6 +474,7 @@ class UI extends React.PureComponent { handleHotkeySearch = e => { e.preventDefault(); + if (!this.node) return; const element = this.node.querySelector('.search__input');