Catch promise errors correctly

This commit is contained in:
Oliver Blanthorn 2020-07-07 11:08:45 +01:00
parent 8696367e5a
commit 7ab7c0b8a3
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -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) {
;
}
browser.sidebarAction.open().catch()
browser.sidebarAction.close().catch()
;(async () => {
const tabs = await browser.tabs.query({ currentWindow: true })
const tridactyl_tabs: browser.tabs.Tab[] = []