diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2020-04-11 16:20:12 +0300 |
---|---|---|
committer | siikamiika <siikamiika@users.noreply.github.com> | 2020-04-11 21:04:30 +0300 |
commit | 5c3641eadb78144b7f6305ebbd574bbc6265a4c4 (patch) | |
tree | 5bfabfb95105cf32b24d2e3861fb725a85f943bc /ext/fg/js/frontend-initialize.js | |
parent | d93e3e1a6727e23547c44d4fc3b82244f560c459 (diff) |
simplify frontend disable override
Diffstat (limited to 'ext/fg/js/frontend-initialize.js')
-rw-r--r-- | ext/fg/js/frontend-initialize.js | 5 |
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); |