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 <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-22 17:27:48 +00:00
1 parent e79b2500c8
commit e6f5ef253f
1 file changed
+1 -1
+1 -1
View File
@@ -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__");