aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend-initialize.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-04-11 16:20:12 +0300
committersiikamiika <siikamiika@users.noreply.github.com>2020-04-11 21:04:30 +0300
commit5c3641eadb78144b7f6305ebbd574bbc6265a4c4 (patch)
tree5bfabfb95105cf32b24d2e3861fb725a85f943bc /ext/fg/js/frontend-initialize.js
parentd93e3e1a6727e23547c44d4fc3b82244f560c459 (diff)
simplify frontend disable override
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);