Skip to content

Commit ff74d90

Browse files
committed
extra removal of null
1 parent f62133d commit ff74d90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rateLimiters/slidingWindowCounter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class SlidingWindowCounter implements RateLimiter {
8787
const newUserWindow: RedisWindow = {
8888
// current and previous tokens represent how many tokens are in each window
8989
currentTokens: tokens <= this.capacity ? tokens : 0,
90-
previousTokens: null,
90+
previousTokens: 0,
9191
fixedWindowStart: timestamp,
9292
};
9393

0 commit comments

Comments
 (0)