Skip to content

Commit 4de866c

Browse files
committed
Avoid "as unknown" hack
1 parent 1a4a877 commit 4de866c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/core/query.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,8 @@ export class Query<
378378
}
379379

380380
// Create query function context
381-
const queryKey = (ensureArray(this.queryKey) as unknown) as TQueryKey
382381
const queryFnContext: QueryFunctionContext<TQueryKey> = {
383-
queryKey,
382+
queryKey: this.queryKey,
384383
pageParam: undefined,
385384
}
386385

@@ -394,7 +393,7 @@ export class Query<
394393
const context: FetchContext<TQueryFnData, TError, TData, any> = {
395394
fetchOptions,
396395
options: this.options,
397-
queryKey,
396+
queryKey: ensureArray(this.queryKey),
398397
state: this.state,
399398
fetchFn,
400399
}

0 commit comments

Comments
 (0)