Skip to content

Commit

Permalink
fix(errorRetryCount): Make sure fetcher doesn't run endlessly when er…
Browse files Browse the repository at this point in the history
…rorRetryCount is set to 0 (#244)
  • Loading branch information
mascii authored Feb 2, 2022
1 parent 638274b commit 0808a6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/use-swrv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function onErrorRetry (revalidate: (any, opts: revalidateOptions) => void, error
return
}

if (config.errorRetryCount && errorRetryCount > config.errorRetryCount) {
if (config.errorRetryCount !== undefined && errorRetryCount > config.errorRetryCount) {
return
}

Expand Down

0 comments on commit 0808a6c

Please sign in to comment.