mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
simplified undefined check
Co-authored-by: Oliver Blanthorn <freedom4cows@gmail.com>
This commit is contained in:
parent
d675e5af23
commit
282d5eccbb
1 changed files with 1 additions and 1 deletions
|
@ -696,7 +696,7 @@ export function simulateClick(
|
|||
(target as HTMLAnchorElement).target === "_blank" ||
|
||||
(target as HTMLAnchorElement).target === "_new"
|
||||
const href = (target as HTMLAnchorElement).href
|
||||
if (href !== undefined && href.startsWith("file:")) {
|
||||
if (href?.startsWith("file:")) {
|
||||
// file URLS cannot be opend with browser.tabs.create
|
||||
// see https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/create#url
|
||||
// still create a new tab
|
||||
|
|
Loading…
Add table
Reference in a new issue