Skip to content

Commit

Permalink
fix(background): query error on http url
Browse files Browse the repository at this point in the history
  • Loading branch information
crimx committed Oct 24, 2020
1 parent 3b5a4bd commit 1922c09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/_helpers/browser-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export async function openUrl(
: optionsOrUrl

const url = options.self ? browser.runtime.getURL(options.url) : options.url
const tabs = await browser.tabs.query({ url })
const tabs = await browser.tabs.query({ url }).catch(() => [])
if (tabs.length > 0) {
const { index, windowId } = tabs[0]
if (typeof browser.tabs['highlight'] === 'function') {
Expand Down

0 comments on commit 1922c09

Please sign in to comment.