mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 17:41:40 -05:00
Catch promise errors correctly
This commit is contained in:
parent
8696367e5a
commit
7ab7c0b8a3
1 changed files with 3 additions and 7 deletions
|
@ -9,13 +9,9 @@ import * as R from "ramda"
|
|||
import { messageTab } from "@src/lib/messaging"
|
||||
|
||||
export function escapehatch() {
|
||||
try {
|
||||
// Only works if called via commands API command - fail silently if called otherwise
|
||||
browser.sidebarAction.open()
|
||||
browser.sidebarAction.close()
|
||||
} catch (e) {
|
||||
;
|
||||
}
|
||||
// Only works if called via commands API command - fail silently if called otherwise
|
||||
browser.sidebarAction.open().catch()
|
||||
browser.sidebarAction.close().catch()
|
||||
;(async () => {
|
||||
const tabs = await browser.tabs.query({ currentWindow: true })
|
||||
const tridactyl_tabs: browser.tabs.Tab[] = []
|
||||
|
|
Loading…
Add table
Reference in a new issue