From 0808a6ce1c6787b7df779e1c7bff91a4318698c0 Mon Sep 17 00:00:00 2001 From: Masaki Koyanagi Date: Wed, 2 Feb 2022 15:13:05 +0900 Subject: [PATCH] fix(errorRetryCount): Make sure fetcher doesn't run endlessly when errorRetryCount is set to 0 (#244) --- src/use-swrv.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/use-swrv.ts b/src/use-swrv.ts index 6d8df03..6d2d362 100644 --- a/src/use-swrv.ts +++ b/src/use-swrv.ts @@ -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 }