We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f3b5b9 commit f68030bCopy full SHA for f68030b
1 file changed
packages/react-router/src/client/utils.ts
@@ -1,3 +1,5 @@
1
+import { GLOBAL_OBJ } from '@sentry/core';
2
+
3
/**
4
* Resolves a navigate argument to a pathname string.
5
*
@@ -18,5 +20,5 @@ export function resolveNavigateArg(target: unknown): string {
18
20
}
19
21
22
// Object `to` without pathname - navigation stays on current path
- return (typeof window !== 'undefined' && window.location?.pathname) || '/';
23
+ return (GLOBAL_OBJ as typeof GLOBAL_OBJ & Window).location?.pathname || '/';
24
0 commit comments