From 20232c1c4f874b020c6d8631291a578ec2a78831 Mon Sep 17 00:00:00 2001 From: Dominik Dorfmeister Date: Sat, 3 Dec 2022 14:36:42 +0100 Subject: [PATCH] fix: revert isServer check to check for window because document is not defined in react-native additionally, we can check for `Deno` being available on the window to support the Deno runtime --- packages/query-core/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/query-core/src/utils.ts b/packages/query-core/src/utils.ts index 26b5ba0d32..3fecede3fb 100644 --- a/packages/query-core/src/utils.ts +++ b/packages/query-core/src/utils.ts @@ -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