Fix(request) retries is broken (#1005)

At the moment, when the method `shouldRetryCondition` is called, the condition are using OR which does not take in count 0 which is also considered as false
a simple fix is the usage of nullish coalescing
This commit is contained in:
Adrien de Peretti
2022-02-01 17:25:16 +01:00
committed by GitHub
parent f4f9653efc
commit f115855282

View File

@@ -159,8 +159,8 @@ class Client {
if (cfg) {
return this.shouldRetryCondition(
err,
cfg.currentRetryAttempt || 1,
cfg.retry || 3
cfg.currentRetryAttempt ?? 1,
cfg.retry ?? 3
)
} else {
return false