Skip to content

Commit

Permalink
fix(query-core): revert isServer check to check for window (#4592)
Browse files Browse the repository at this point in the history
because document is not defined in react-native
additionally, we can check for `Deno` being available on the window to support the Deno runtime
  • Loading branch information
TkDodo authored Dec 3, 2022
1 parent 5ebc68a commit 6df7b6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/query-core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export type QueryTypeFilter = 'all' | 'active' | 'inactive'

// UTILS

export const isServer = typeof document === 'undefined'
export const isServer = typeof window === 'undefined' || 'Deno' in window

export function noop(): undefined {
return undefined
Expand Down

0 comments on commit 6df7b6f

Please sign in to comment.