Skip to content

Commit 5b6765a

Browse files
committed
fix(solid-query): client() doesn't return undefined
1 parent 5f65345 commit 5b6765a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/solid-query/src/useBaseQuery.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,11 @@ export function useBaseQuery<
116116
) {
117117
type ResourceData = QueryObserverResult<TData, TError>
118118

119-
const client = createMemo(() => useQueryClient(queryClient?.()))
119+
const client = createMemo(
120+
() => useQueryClient(queryClient?.()),
121+
useQueryClient(queryClient?.()),
122+
)
123+
120124
const isRestoring = useIsRestoring()
121125
// There are times when we run a query on the server but the resource is never read
122126
// This could lead to times when the queryObserver is unsubscribed before the resource has loaded

0 commit comments

Comments
 (0)