summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/bg/js/backend.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 06010a95..a9f2385b 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -628,7 +628,8 @@ class Backend {
return;
case 'popup':
if (this.popupWindow !== null) {
- chrome.windows.remove(this.popupWindow.id);
+ const callback = () => this.checkLastError(chrome.runtime.lastError);
+ chrome.windows.remove(this.popupWindow.id, callback);
}
this.popupWindow = await new Promise((resolve) => chrome.windows.create(
{url, width: popupWidth, height: popupHeight, type: 'popup'},