We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
NaN
1 parent 74565f4 commit ebc5ccaCopy full SHA for ebc5cca
source/lib.ts
@@ -35,7 +35,7 @@ const parseScriptResponse = (results: RedisReply): ClientRateLimitInfo => {
35
if (results.length !== 2)
36
throw new Error(`Expected 2 replies, got ${results.length}`)
37
38
- const totalHits = toInt(results[0])
+ const totalHits = results[0] === false ? 0 : toInt(results[0])
39
const timeToExpire = toInt(results[1])
40
41
const resetTime = new Date(Date.now() + timeToExpire)
0 commit comments