From 7a39ce34fa78d9395cc8dee177ad490d5b91daa0 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sat, 28 Feb 2026 16:20:57 -0800 Subject: [PATCH] Avoid popup-open false errors on mobile browsers - Stop throwing when `window.open` returns `null` in `wsNativeApi` - Keep opening external links in a new tab and rely on browser popup policy --- apps/web/src/wsNativeApi.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/web/src/wsNativeApi.ts b/apps/web/src/wsNativeApi.ts index ec147794e4a4f639df7bc8f8d86a60b2707f5213..f7ac04a9b07a6b4b10dc3214ea53b41b067a7e31 100644 --- a/apps/web/src/wsNativeApi.ts +++ b/apps/web/src/wsNativeApi.ts @@ -153,10 +153,9 @@ export function createWsNativeApi(): NativeApi { return; } - const popup = window.open(url, "_blank", "noopener,noreferrer"); - if (!popup) { - throw new Error("Unable to open link. Allow popups and try again."); - } + // Some mobile browsers can return null here even when the tab opens. + // Avoid false negatives and let the browser handle popup policy. + window.open(url, "_blank", "noopener,noreferrer"); }, }, git: { -- 2.54.0