Skip to content

Commit

Permalink
Fixes abort controller not working in useQuery
Browse files Browse the repository at this point in the history
Fixes #7265;
  • Loading branch information
rithviknishad committed Feb 24, 2024
1 parent 868ee4a commit 2e66a9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Utils/request/useQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function useQuery<TData>(
: overrides ?? options;

setLoading(true);
const response = await request(route, resolvedOptions);
const response = await request(route, { ...resolvedOptions, controller });
setResponse(response);
setLoading(false);
return response;
Expand Down

0 comments on commit 2e66a9c

Please sign in to comment.