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.
1 parent f62133d commit ff74d90Copy full SHA for ff74d90
src/rateLimiters/slidingWindowCounter.ts
@@ -87,7 +87,7 @@ class SlidingWindowCounter implements RateLimiter {
87
const newUserWindow: RedisWindow = {
88
// current and previous tokens represent how many tokens are in each window
89
currentTokens: tokens <= this.capacity ? tokens : 0,
90
- previousTokens: null,
+ previousTokens: 0,
91
fixedWindowStart: timestamp,
92
};
93
0 commit comments