We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a9fc4c commit 1baab21Copy full SHA for 1baab21
1 file changed
src/util/rate-limit.ts
@@ -22,8 +22,7 @@ export const rateLimit = (ms: number) => {
22
*/
23
const canRun = () => {
24
const now = Date.now();
25
- if (now - last >= ms) {
26
- last = now;
+ if (last === 0 || now - last >= ms) {
27
return true;
28
}
29
return false;
0 commit comments