Skip to content

Commit

Permalink
fix: use-request auto collect deps first request twice
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonYong committed Jun 1, 2023
1 parent 369ebf9 commit 10fb0df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hooks/src/useRequest/plugins/useAutoRunPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const useAutoRunPlugin: UseRequestPlugin<unknown, unknown[]> = (
const hasAutoRun = ref(false)

watchEffect(() => {
if (!manual) hasAutoRun.value = unref(ready)
if (!manual && fetchInstance.options.refreshDeps !== true) hasAutoRun.value = unref(ready)
})

if (refreshDeps instanceof Array)
Expand Down

0 comments on commit 10fb0df

Please sign in to comment.