From e6f5ef253fd15bee1613042ac41411a96ba12852 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 22 Feb 2026 17:27:48 +0000 Subject: [PATCH] fix(relayManager): robust check for window.location in getTestRelayOverrides - Fixes a unit test regression where `getTestRelayOverrides` crashed in Node.js environments (where `window` exists but `window.location` is undefined). - Updated the check to explicitly verify `window.location` before accessing `.search`. - Verified via `npm run test:unit:shard2`. Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- js/relayManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/relayManager.js b/js/relayManager.js index 1e37511a..7f2cded3 100644 --- a/js/relayManager.js +++ b/js/relayManager.js @@ -198,7 +198,7 @@ function resolveEntryInput(entry) { } function getTestRelayOverrides() { - if (typeof window === "undefined") return null; + if (typeof window === "undefined" || !window.location) return null; const params = new URLSearchParams(window.location.search); const paramRelays = params.get("__testRelays__");