Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Sep 20, 2024
1 parent 6663511 commit b6aa7f0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class UpstashRatelimitHandler extends BaseCallbackHandler {

// result of getRemaining was changed from a number to an object in v2.0.0.
// we check to make sure that it works with versions before & after:
const remaining = typeof result === "number" ? result : result.remaining
const remaining = typeof result === "number" ? result : result.remaining;

if (remaining <= 0) {
throw new UpstashRatelimitError("Token limit reached!", "token");
Expand Down

0 comments on commit b6aa7f0

Please sign in to comment.