From 260291e07f7056b9f71013d483f65e48388020d2 Mon Sep 17 00:00:00 2001 From: hackademix Date: Fri, 18 Oct 2019 10:51:44 +0200 Subject: Fixed typo causing initializing promise not being cached. --- src/bg/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/bg/main.js b/src/bg/main.js index bae534f..acc849d 100644 --- a/src/bg/main.js +++ b/src/bg/main.js @@ -140,8 +140,9 @@ return await Settings.import(data); }, - fetchChildPolicy({url, contextUrl}, sender) { + async fetchChildPolicy({url, contextUrl}, sender) { let {tab, frameId} = sender; + await ns.initializing; let policy = ns.policy; if (!policy) { console.log("Policy is null, initializing: %o, sending fallback.", ns.initializing); @@ -223,7 +224,7 @@ if (this.running) return; this.running = true; browser.runtime.onSyncMessage.addListener(onSyncMessage); - deferWebTraffic(this.initalizing = init(), + deferWebTraffic(this.initializing = init(), async () => { Commands.install(); -- cgit v1.2.3