fix PortDownloader::onDisconnect
This commit is contained in:
parent
c635f2e38c
commit
7c2b46be83
|
@ -399,8 +399,8 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
port.onDisconnect.addListener(async () => {
|
port.onDisconnect.addListener(async () => {
|
||||||
const tab = await browser.tabs.get(tabId);
|
const tab = await browser.tabs.get(tabId).catch(() => ({}));
|
||||||
if (!chrome.runtime.lastError && tab.url === initialUrl) {
|
if (tab.url === initialUrl) {
|
||||||
location.reload();
|
location.reload();
|
||||||
} else {
|
} else {
|
||||||
closeCurrentTab();
|
closeCurrentTab();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user