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