Skip to content

Commit 7106ec2

Browse files
committed
Update string modifier when objects given
1 parent 3a1033d commit 7106ec2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/modifiers/type.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ function modify(data, model) {
1515

1616
switch (model.type.toLowerCase()) {
1717
case 'string':
18-
if (data) {
18+
if (typeof data === 'object') {
19+
parsed = JSON.stringify(data);
20+
} else {
1921
parsed = String(data);
2022
}
2123
break;

0 commit comments

Comments
 (0)