diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-02-23 11:59:57 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-02-23 11:59:57 -0500 |
commit | 76976439669d31484b116df3ea4d9bbcbb485e32 (patch) | |
tree | cb7091c16f12c28fe4dda0dd3327c93bd5c29628 /ext/bg/js | |
parent | 5a5c18371ca6df5473f9d5ef9a391acde6c2e168 (diff) |
Reject with a consistent error
Diffstat (limited to 'ext/bg/js')
-rw-r--r-- | ext/bg/js/backend.js | 6 |
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(); } |