fix PortDownloader::onDisconnect

This commit is contained in:
tophf 2020-11-19 22:28:17 +03:00
parent c635f2e38c
commit 7c2b46be83

View File

@ -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();