Fix bug with undefined cb

This commit is contained in:
Ilya Ig. Petrov 2017-11-25 19:32:01 +05:00
parent 4738bcf9af
commit 1191a5e043

View File

@ -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();
},
};