mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
lib/webext.ts: Fix error thrown on page load
It is not useful to await in ownTabContainer as it could cause an unnecessary context switch and will throw an error if the tab is not in a container. While it could seem like throwing errors in ownTabContainer is not a big deal, it is actually quite annoying when using Firefox's "Pause on exceptions" feature: execution is paused even if the error is caught by the caller and there is no stack trace to help us understand what's happening because ownTabContainer is async. Thus, removing this await is very useful.
This commit is contained in:
parent
1123554970
commit
8744d73423
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ export async function ownTabId() {
|
|||
|
||||
//#content_helper
|
||||
export async function ownTabContainer() {
|
||||
return await browserBg.contextualIdentities.get(
|
||||
return browserBg.contextualIdentities.get(
|
||||
(await ownTab()).cookieStoreId,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue