Reject with a consistent error

This commit is contained in:
toasted-nutbread 2020-02-23 11:59:57 -05:00
parent 5a5c18371c
commit 7697643966

View File

@ -802,7 +802,7 @@ class Backend {
chrome.tabs.update(tab.id, {active: true}, () => {
const e = chrome.runtime.lastError;
if (e) {
reject(e);
reject(new Error(e.message));
} else {
resolve();
}
@ -819,7 +819,7 @@ class Backend {
chrome.windows.get(tab.windowId, {}, (value) => {
const e = chrome.runtime.lastError;
if (e) {
reject(e);
reject(new Error(e.message));
} else {
resolve(value);
}
@ -830,7 +830,7 @@ class Backend {
chrome.windows.update(tab.windowId, {focused: true}, () => {
const e = chrome.runtime.lastError;
if (e) {
reject(e);
reject(new Error(e.message));
} else {
resolve();
}