skapi-js 1.0.62-beta.21 → 1.0.62-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/skapi.js +1 -1
- package/dist/skapi.js.map +1 -1
- package/dist/skapi.module.js +1 -1
- package/dist/skapi.module.js.map +1 -1
- package/js/utils/validator.js +9 -4
- package/package.json +1 -1
package/js/utils/validator.js
CHANGED
|
@@ -155,12 +155,17 @@ function Params(params, struct, required = []) {
|
|
|
155
155
|
let toCheck = {};
|
|
156
156
|
for (let s in struct) {
|
|
157
157
|
if (p.hasOwnProperty(s)) {
|
|
158
|
-
|
|
159
|
-
toCheck[s] = JSON.parse(JSON.stringify(p[s]));
|
|
160
|
-
}
|
|
161
|
-
catch (err) {
|
|
158
|
+
if (typeof p[s] === 'function') {
|
|
162
159
|
toCheck[s] = p[s];
|
|
163
160
|
}
|
|
161
|
+
else {
|
|
162
|
+
try {
|
|
163
|
+
toCheck[s] = JSON.parse(JSON.stringify(p[s]));
|
|
164
|
+
}
|
|
165
|
+
catch (err) {
|
|
166
|
+
toCheck[s] = p[s];
|
|
167
|
+
}
|
|
168
|
+
}
|
|
164
169
|
}
|
|
165
170
|
}
|
|
166
171
|
try {
|