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.
- package/package.json +1 -1
- package/src/form/form.js +6 -12
package/package.json
CHANGED
package/src/form/form.js
CHANGED
|
@@ -68,7 +68,7 @@ class Form {
|
|
|
68
68
|
EXTRACTORS = {},
|
|
69
69
|
ENV_EXTRACTORS = {},
|
|
70
70
|
TRANSFORMERS = {},
|
|
71
|
-
rate
|
|
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
|
-
|
|
485
|
-
rate.options
|
|
486
|
-
|
|
487
|
-
|
|
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
|
|