Skip to content

Commit 56fad10

Browse files
authoredJun 30, 2024··
fix(react-query): experimental before/after query options (#7652)
1 parent 4be599f commit 56fad10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎packages/react-query/src/useBaseQuery.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function useBaseQuery<
4949
const errorResetBoundary = useQueryErrorResetBoundary()
5050
const defaultedOptions = client.defaultQueryOptions(options)
5151

52-
;(client.getDefaultOptions().queries as any)._experimental_beforeQuery?.(
52+
;(client.getDefaultOptions().queries as any)?._experimental_beforeQuery?.(
5353
defaultedOptions,
5454
)
5555

@@ -125,7 +125,7 @@ export function useBaseQuery<
125125
throw result.error
126126
}
127127

128-
;(client.getDefaultOptions().queries as any)._experimental_afterQuery?.(
128+
;(client.getDefaultOptions().queries as any)?._experimental_afterQuery?.(
129129
defaultedOptions,
130130
result,
131131
)

0 commit comments

Comments
 (0)
Please sign in to comment.