express-rate-limit 7.4.0 → 7.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -681,9 +681,9 @@ var rateLimit = (passedOptions) => {
681
681
  error
682
682
  );
683
683
  next();
684
- } else {
685
- throw error;
684
+ return;
686
685
  }
686
+ throw error;
687
687
  }
688
688
  config.validations.positiveHits(totalHits);
689
689
  config.validations.singleCount(request, config.store, key);
package/dist/index.mjs CHANGED
@@ -653,9 +653,9 @@ var rateLimit = (passedOptions) => {
653
653
  error
654
654
  );
655
655
  next();
656
- } else {
657
- throw error;
656
+ return;
658
657
  }
658
+ throw error;
659
659
  }
660
660
  config.validations.positiveHits(totalHits);
661
661
  config.validations.singleCount(request, config.store, key);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-rate-limit",
3
- "version": "7.4.0",
3
+ "version": "7.4.1",
4
4
  "description": "Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.",
5
5
  "author": {
6
6
  "name": "Nathan Friedly",
@@ -87,7 +87,7 @@
87
87
  "del-cli": "5.1.0",
88
88
  "dts-bundle-generator": "8.0.1",
89
89
  "esbuild": "0.19.5",
90
- "express": "4.19.2",
90
+ "express": "4.21.0",
91
91
  "husky": "8.0.3",
92
92
  "jest": "29.7.0",
93
93
  "lint-staged": "15.0.2",