Skip to content

Commit

Permalink
fix(react-query): experimental before/after query options (#7652)
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley authored Jun 30, 2024
1 parent 4be599f commit 56fad10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-query/src/useBaseQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function useBaseQuery<
const errorResetBoundary = useQueryErrorResetBoundary()
const defaultedOptions = client.defaultQueryOptions(options)

;(client.getDefaultOptions().queries as any)._experimental_beforeQuery?.(
;(client.getDefaultOptions().queries as any)?._experimental_beforeQuery?.(
defaultedOptions,
)

Expand Down Expand Up @@ -125,7 +125,7 @@ export function useBaseQuery<
throw result.error
}

;(client.getDefaultOptions().queries as any)._experimental_afterQuery?.(
;(client.getDefaultOptions().queries as any)?._experimental_afterQuery?.(
defaultedOptions,
result,
)
Expand Down

0 comments on commit 56fad10

Please sign in to comment.