Fix minor bug in bg.js
A break statement was missing in a switch. This commit also fixes some
minor cosmetic issues reported by eslint in bg.js.
Change-Id: I01adfe262a315fb993c894c7f116b797ca4352e7
diff --git a/.eslintrc.json b/.eslintrc.json
index b110eaa..185c15a 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -15,5 +15,8 @@
},
"ignorePatterns": [
"webpack.config.js"
- ]
+ ],
+ "globals": {
+ "PRODUCTION": "readonly"
+ }
}
diff --git a/src/bg.js b/src/bg.js
index 44b546a..394f0fd 100644
--- a/src/bg.js
+++ b/src/bg.js
@@ -22,7 +22,7 @@
// don't know whether it's the extension startup.
if (!chrome.storage.session) return Promise.resolve(true);
- return new Promise((resolve, reject) => {
+ return new Promise(resolve => {
return chrome.storage.session.get('hasAlreadyStarted', v => {
resolve(v.hasAlreadyStarted !== true);
});
@@ -79,7 +79,7 @@
if (areaName !== 'sync') return;
cleanUpOptPermissions();
- for (let [key, {oldValue, newValue}] of Object.entries(changes)) {
+ for (let [key] of Object.entries(changes)) {
handleBgOptionChange(key);
}
});
@@ -106,6 +106,7 @@
chrome.tabs.create({
url: chrome.runtime.getURL('options/workflows.html'),
});
+ break;
default:
console.warn('Unknown message "' + msg.message + '".');