aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-23 11:59:57 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-23 11:59:57 -0500
commit76976439669d31484b116df3ea4d9bbcbb485e32 (patch)
treecb7091c16f12c28fe4dda0dd3327c93bd5c29628 /ext/bg/js
parent5a5c18371ca6df5473f9d5ef9a391acde6c2e168 (diff)
Reject with a consistent error
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/backend.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 2691b7d9..e3bf7bda 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -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();
}