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:
hermes-seaeye[bot]
2026-08-29 05:56:24 +00:00
committed by GitHub
parent 178c23fb27
commit d7c0fb9d66

View File

@@ -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