aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend-initialize.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/frontend-initialize.js')
-rw-r--r--ext/fg/js/frontend-initialize.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/fg/js/frontend-initialize.js b/ext/fg/js/frontend-initialize.js
index 34be6bc6..e794c7c0 100644
--- a/ext/fg/js/frontend-initialize.js
+++ b/ext/fg/js/frontend-initialize.js
@@ -80,6 +80,7 @@ async function main() {
};
let frontend = null;
+ let frontendPreparePromise = null;
const applyOptions = async () => {
const optionsContext = {depth: isSearchPage ? 0 : depth, url};
@@ -99,8 +100,10 @@ async function main() {
if (frontend === null) {
frontend = new Frontend(popup);
- await frontend.prepare();
+ frontendPreparePromise = frontend.prepare();
+ await frontendPreparePromise;
} else {
+ await frontendPreparePromise;
if (isSearchPage) {
const disabled = !options.scanning.enableOnSearchPage;
frontend.setDisabledOverride(disabled);