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
This commit is contained in:
Julius Marminge committed 2026-02-28 16:20:57 -08:00
1 parent 82dd65f487
commit 4e54afb12d
1 file changed
+3 -4
+3 -4
View File
@@ -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: {