Fix frontend being null if messages are received early (#575)

This commit is contained in:
toasted-nutbread 2020-05-30 09:31:46 -04:00 committed by GitHub
parent 18f376358c
commit 1a5a37c9e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,6 +141,7 @@ class PopupPreviewFrame {
if (exampleText === null) { return; }
exampleText.textContent = text;
if (this._frontend === null) { return; }
this._updateSearch();
}
@ -163,6 +164,7 @@ class PopupPreviewFrame {
async _updateOptionsContext({optionsContext}) {
this._optionsContext = optionsContext;
if (this._frontend === null) { return; }
await this._frontend.updateOptions();
await this._updateSearch();
}