Catch exception thrown on Edge
This commit is contained in:
parent
d7dc8ac9cd
commit
362a1ed9e4
@ -380,6 +380,7 @@ async function apiFocusTab(tab) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
const tabWindow = await new Promise((resolve) => {
|
const tabWindow = await new Promise((resolve) => {
|
||||||
chrome.windows.get(tab.windowId, {}, (tabWindow) => {
|
chrome.windows.get(tab.windowId, {}, (tabWindow) => {
|
||||||
const e = chrome.runtime.lastError;
|
const e = chrome.runtime.lastError;
|
||||||
@ -396,4 +397,7 @@ async function apiFocusTab(tab) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// Edge throws exception for no reason here.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user