Skip to content

Commit 7f949f4

Browse files
committed
[api] convert types of nested objects too
1 parent d723428 commit 7f949f4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

api/utils/common.js

+6
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,12 @@ common.convertToType = function(value) {
373373
}
374374
return value;
375375
}
376+
else if (value && typeof value === "object") {
377+
for (var key in value) {
378+
value[key] = common.convertToType(value[key]);
379+
}
380+
return value;
381+
}
376382
//if value can be a number
377383
else if (common.isNumber(value)) {
378384
//check if it is string but is less than 16 length

0 commit comments

Comments
 (0)