Skip to content

Commit

Permalink
feat: support params
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyair committed Dec 2, 2024
1 parent cd1fba6 commit 6361a9c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ const useAutoRunPlugin: Plugin<any, any[]> = (
useUpdateEffect(() => {
if (!manual && ready) {
hasAutoRun.current = true;
fetchInstance.run(...defaultParams);
if (params.length > 0) {
fetchInstance.run(...params);
} else {
fetchInstance.run(...defaultParams);
}
}
}, [ready]);

Expand Down

0 comments on commit 6361a9c

Please sign in to comment.