Possible crash fix: defensive checks of this.node
This commit is contained in:
parent
284972aa76
commit
52b14d9d09
2 changed files with 3 additions and 1 deletions
|
@ -462,7 +462,7 @@ class Status extends ImmutablePureComponent {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prevProps.status && ancestorsIds && ancestorsIds.size > 0) {
|
if (prevProps.status && ancestorsIds && ancestorsIds.size > 0 && this.node) {
|
||||||
const element = this.node.querySelector('.detailed-status');
|
const element = this.node.querySelector('.detailed-status');
|
||||||
|
|
||||||
window.requestAnimationFrame(() => {
|
window.requestAnimationFrame(() => {
|
||||||
|
|
|
@ -463,6 +463,7 @@ class UI extends React.PureComponent {
|
||||||
|
|
||||||
handleHotkeyNew = e => {
|
handleHotkeyNew = e => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if (!this.node) return;
|
||||||
|
|
||||||
const element = this.node.querySelector('.compose-form__autosuggest-wrapper textarea');
|
const element = this.node.querySelector('.compose-form__autosuggest-wrapper textarea');
|
||||||
|
|
||||||
|
@ -473,6 +474,7 @@ class UI extends React.PureComponent {
|
||||||
|
|
||||||
handleHotkeySearch = e => {
|
handleHotkeySearch = e => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if (!this.node) return;
|
||||||
|
|
||||||
const element = this.node.querySelector('.search__input');
|
const element = this.node.querySelector('.search__input');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue