handle closing already closed popup
This commit is contained in:
parent
d7f0369281
commit
8d56d6ffcb
@ -628,7 +628,8 @@ class Backend {
|
|||||||
return;
|
return;
|
||||||
case 'popup':
|
case 'popup':
|
||||||
if (this.popupWindow !== null) {
|
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(
|
this.popupWindow = await new Promise((resolve) => chrome.windows.create(
|
||||||
{url, width: popupWidth, height: popupHeight, type: 'popup'},
|
{url, width: popupWidth, height: popupHeight, type: 'popup'},
|
||||||
|
Loading…
Reference in New Issue
Block a user