Skip to content

Commit

Permalink
Update string modifier when objects given
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingCarlos committed Apr 14, 2018
1 parent 3a1033d commit 7106ec2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/modifiers/type.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ function modify(data, model) {

switch (model.type.toLowerCase()) {
case 'string':
if (data) {
if (typeof data === 'object') {
parsed = JSON.stringify(data);
} else {
parsed = String(data);
}
break;
Expand Down

0 comments on commit 7106ec2

Please sign in to comment.