diff --git a/packages/core/src/QueryBuilder.ts b/packages/core/src/QueryBuilder.ts index ccb89b93..9258fe13 100644 --- a/packages/core/src/QueryBuilder.ts +++ b/packages/core/src/QueryBuilder.ts @@ -217,7 +217,7 @@ export default class Query< { #instructions: TInstructions; - constructor(instructions: TInstructions) { + constructor(instructions: TInstructions = [] as unknown as TInstructions) { this.#instructions = instructions; } diff --git a/packages/react/src/hooks/useQuery.ts b/packages/react/src/hooks/useQuery.ts index 15c05cb3..fbc01ea3 100644 --- a/packages/react/src/hooks/useQuery.ts +++ b/packages/react/src/hooks/useQuery.ts @@ -46,7 +46,7 @@ export function useQueryRefresher< return; } - const query = builder(new Query([])); + const query = builder(new Query()); if (!query) { return; @@ -102,7 +102,7 @@ export function useLazyLoadQueryWithRefresh< const chainId = useChainId(options); const query = useMemo( - () => (!builder ? undefined : builder(new Query([]))), + () => (!builder ? undefined : builder(new Query())), [builder], );