Skip to content

Commit bca6379

Browse files
authored
fix(react-query): useSuspenseInfiniteQuery needs to use defaultThrowOnError, too (#6081)
1 parent 1c4a94e commit bca6379

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/react-query/src/useSuspenseInfiniteQuery.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use client'
22
import { InfiniteQueryObserver } from '@tanstack/query-core'
33
import { useBaseQuery } from './useBaseQuery'
4+
import { defaultThrowOnError } from './suspense'
45
import type {
56
InfiniteQueryObserverSuccessResult,
67
QueryObserver,
@@ -38,7 +39,7 @@ export function useSuspenseInfiniteQuery<
3839
...options,
3940
enabled: true,
4041
suspense: true,
41-
throwOnError: true,
42+
throwOnError: defaultThrowOnError,
4243
},
4344
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
4445
InfiniteQueryObserver as typeof QueryObserver,

0 commit comments

Comments
 (0)