not-node 6.3.26 → 6.3.27

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/form/form.js +6 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "not-node",
3
- "version": "6.3.26",
3
+ "version": "6.3.27",
4
4
  "description": "node complimentary part for client side notFramework.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/form/form.js CHANGED
@@ -68,7 +68,7 @@ class Form {
68
68
  EXTRACTORS = {},
69
69
  ENV_EXTRACTORS = {},
70
70
  TRANSFORMERS = {},
71
- rate = null,
71
+ rate,
72
72
  }) {
73
73
  this.#FORM_NAME = FORM_NAME;
74
74
  this.#MODEL_NAME = MODEL_NAME;
@@ -471,7 +471,7 @@ class Form {
471
471
  }
472
472
 
473
473
  #createRateLimiter(rate) {
474
- if (rate) {
474
+ if (rate && rate.options && typeof rate.options == "object") {
475
475
  if (typeof rate.idGetter === "function") {
476
476
  this.#rateLimiterIdGetter = rate.idGetter;
477
477
  }
@@ -481,16 +481,10 @@ class Form {
481
481
  if (rate.client && typeof rate.client === "string") {
482
482
  this.#rateLimiterClientName = rate.client;
483
483
  }
484
- if (
485
- rate.options &&
486
- typeof rate.options == "object" &&
487
- typeof rate.client === "string"
488
- ) {
489
- this.#rateLimiter = InitRateLimiter.initCustom(
490
- rate.options,
491
- this.#rateLimiterClientName
492
- );
493
- }
484
+ this.#rateLimiter = InitRateLimiter.initCustom(
485
+ rate.options,
486
+ this.#rateLimiterClientName
487
+ );
494
488
  }
495
489
  }
496
490