Suppress messages about unchecked runtime.lastError
This commit is contained in:
parent
6c3671b3d9
commit
a50ce724eb
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user