Skip to content

Commit 6df7b6f

Browse files
authored
fix(query-core): revert isServer check to check for window (#4592)
because document is not defined in react-native additionally, we can check for `Deno` being available on the window to support the Deno runtime
1 parent 5ebc68a commit 6df7b6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/query-core/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export type QueryTypeFilter = 'all' | 'active' | 'inactive'
6868

6969
// UTILS
7070

71-
export const isServer = typeof document === 'undefined'
71+
export const isServer = typeof window === 'undefined' || 'Deno' in window
7272

7373
export function noop(): undefined {
7474
return undefined

0 commit comments

Comments
 (0)