aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-05-30 09:31:46 -0400
committerGitHub <noreply@github.com>2020-05-30 09:31:46 -0400
commit1a5a37c9e47dc4d1f1e1b3ffaf990e792140b912 (patch)
tree6f5a979d6a55a6d90cb56bccb6dc81b5f3768a73
parent18f376358c4c8eec1e46fe1d9396861a42559918 (diff)
Fix frontend being null if messages are received early (#575)
-rw-r--r--ext/bg/js/settings/popup-preview-frame.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/bg/js/settings/popup-preview-frame.js b/ext/bg/js/settings/popup-preview-frame.js
index 28c95efb..21fee7ee 100644
--- a/ext/bg/js/settings/popup-preview-frame.js
+++ b/ext/bg/js/settings/popup-preview-frame.js
@@ -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();
}