From 1191a5e0432e49243e2d9313d5d1eb74ce158995 Mon Sep 17 00:00:00 2001 From: "Ilya Ig. Petrov" Date: Sat, 25 Nov 2017 19:32:01 +0500 Subject: [PATCH] Fix bug with undefined cb --- .../src/extension-common/00-init-apis.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/00-init-apis.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/00-init-apis.js index c4bf71e..ce40fcf 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/00-init-apis.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/00-init-apis.js @@ -264,7 +264,7 @@ let currentSettings = ffxStore('proxySettings') || {}; currentSettings.levelOfControl = 'controlled_by_this_extension'; // May be lie, but this field is required. - cb(currentSettings); + cb && cb(currentSettings); }, onChange: { @@ -280,7 +280,7 @@ browser.runtime.sendMessage(details, {toProxyScript: true}); ffxStore('proxySettings', details); - cb(); + cb && cb(); }, };