aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-08-23 15:41:41 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-08-23 15:41:41 -0400
commita50ce724eb70f54f8e62207ec2630997967f36d7 (patch)
tree8fce0821392231b47ae371c2d2760b950862d834 /ext/bg/js
parent6c3671b3d98896ea710d70927024db4d2cbbad06 (diff)
Suppress messages about unchecked runtime.lastError
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/backend.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index d49286d0..d95cb82d 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -57,9 +57,10 @@ class Backend {
this.anki = new AnkiNull();
}
+ const callback = () => this.checkLastError(chrome.runtime.lastError);
chrome.tabs.query({}, tabs => {
for (const tab of tabs) {
- chrome.tabs.sendMessage(tab.id, {action: 'optionsSet', params: options}, () => null);
+ chrome.tabs.sendMessage(tab.id, {action: 'optionsSet', params: options}, callback);
}
});
}
@@ -147,6 +148,10 @@ class Backend {
chrome.browserAction.setBadgeText({text});
}
}
+
+ checkLastError(e) {
+ // NOP
+ }
}
window.yomichan_backend = new Backend();