fmt(js): npm run fix on merge (#97706)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
178c23fb27
commit
d7c0fb9d66
@@ -216,9 +216,7 @@ export function wantsNativeBrowser(event: Pick<MouseEvent, 'button' | 'ctrlKey'
|
||||
* either no-ops or tries to paint a webview into the transparent overlay —
|
||||
* the OAuth-in-the-HUD case. Always hand off to the OS browser.
|
||||
*/
|
||||
export function hudForcesNativeLinks(
|
||||
search = typeof window === 'undefined' ? '' : window.location.search
|
||||
): boolean {
|
||||
export function hudForcesNativeLinks(search = typeof window === 'undefined' ? '' : window.location.search): boolean {
|
||||
try {
|
||||
return new URLSearchParams(search).get('win') === 'hud'
|
||||
} catch {
|
||||
@@ -245,11 +243,7 @@ export function openLink(href: string, options: { native?: boolean } = {}): void
|
||||
return
|
||||
}
|
||||
|
||||
if (
|
||||
options.native ||
|
||||
hudForcesNativeLinks() ||
|
||||
!/^https?:$/i.test(parseUrl(target)?.protocol ?? '')
|
||||
) {
|
||||
if (options.native || hudForcesNativeLinks() || !/^https?:$/i.test(parseUrl(target)?.protocol ?? '')) {
|
||||
openExternalLink(target)
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user