Possible crash fix: defensive checks of this.node

unuglify-production
Alex Gleason 2021-07-11 17:50:30 -05:00
rodzic 284972aa76
commit 52b14d9d09
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

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

Wyświetl plik

@ -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');