From 76976439669d31484b116df3ea4d9bbcbb485e32 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 23 Feb 2020 11:59:57 -0500 Subject: [PATCH] Reject with a consistent error --- ext/bg/js/backend.js | 6 +++--- 1 file 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(); }