Skip to content

Commit da1fb44

Browse files
Eric Sitarzesitarz
authored andcommitted
fix: guard query persister storage access
1 parent 6729b2f commit da1fb44

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ export const queryClient = new QueryClient({
1212
});
1313

1414
export const asyncStoragePersister: Persister = createAsyncStoragePersister({
15-
storage: window.localStorage,
15+
storage: typeof window !== "undefined" ? window.localStorage : undefined,
1616
});

0 commit comments

Comments
 (0)