summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhackademix2019-10-18 10:51:44 +0200
committerhackademix2019-10-18 10:51:44 +0200
commit260291e07f7056b9f71013d483f65e48388020d2 (patch)
treeae29c2a97f84fc9413c59d891df62f4eb17e9203
parentf1cf5d9535d997de0c12082be3a738de4c1d2b8b (diff)
downloadnoscript-260291e07f7056b9f71013d483f65e48388020d2.tar.gz
noscript-260291e07f7056b9f71013d483f65e48388020d2.tar.xz
noscript-260291e07f7056b9f71013d483f65e48388020d2.zip
Fixed typo causing initializing promise not being cached.
-rw-r--r--src/bg/main.js5
1 files changed, 3 insertions, 2 deletions
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();