@nattyjs/core 0.0.1-beta.20 → 0.0.1-beta.22
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 +5 -3
- package/dist/index.mjs +5 -3
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -527,12 +527,14 @@ class ParameterTypeConverter extends BaseResponse {
|
|
|
527
527
|
} else {
|
|
528
528
|
if (this.isArrayType(property.type) && Array.isArray(value)) {
|
|
529
529
|
let arrayValue = body[property.name] = [];
|
|
530
|
-
let arrayInvalidProps = invalidProps[property.name] = [];
|
|
531
530
|
for (const item of value) {
|
|
532
531
|
const sanitizeValue = this.sanitizer[property.type.toLowerCase()] ? this.sanitizer[property.type.toLowerCase()](item) : item;
|
|
533
|
-
if (sanitizeValue === INVALID_VALUE)
|
|
532
|
+
if (sanitizeValue === INVALID_VALUE) {
|
|
533
|
+
let arrayInvalidProps = invalidProps[property.name];
|
|
534
|
+
if (!arrayInvalidProps)
|
|
535
|
+
arrayInvalidProps = invalidProps[property.name] = [];
|
|
534
536
|
arrayInvalidProps.push(property);
|
|
535
|
-
else
|
|
537
|
+
} else
|
|
536
538
|
arrayValue.push(sanitizeValue);
|
|
537
539
|
}
|
|
538
540
|
} else
|
package/dist/index.mjs
CHANGED
|
@@ -525,12 +525,14 @@ class ParameterTypeConverter extends BaseResponse {
|
|
|
525
525
|
} else {
|
|
526
526
|
if (this.isArrayType(property.type) && Array.isArray(value)) {
|
|
527
527
|
let arrayValue = body[property.name] = [];
|
|
528
|
-
let arrayInvalidProps = invalidProps[property.name] = [];
|
|
529
528
|
for (const item of value) {
|
|
530
529
|
const sanitizeValue = this.sanitizer[property.type.toLowerCase()] ? this.sanitizer[property.type.toLowerCase()](item) : item;
|
|
531
|
-
if (sanitizeValue === INVALID_VALUE)
|
|
530
|
+
if (sanitizeValue === INVALID_VALUE) {
|
|
531
|
+
let arrayInvalidProps = invalidProps[property.name];
|
|
532
|
+
if (!arrayInvalidProps)
|
|
533
|
+
arrayInvalidProps = invalidProps[property.name] = [];
|
|
532
534
|
arrayInvalidProps.push(property);
|
|
533
|
-
else
|
|
535
|
+
} else
|
|
534
536
|
arrayValue.push(sanitizeValue);
|
|
535
537
|
}
|
|
536
538
|
} else
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nattyjs/core",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.22",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "ajayojha",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"tsyringe": "^4.7.0",
|
|
19
19
|
"path-to-regexp": "6.2.1",
|
|
20
|
-
"@nattyjs/common": "0.0.1-beta.
|
|
20
|
+
"@nattyjs/common": "0.0.1-beta.22"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"unbuild": "1.2.1"
|