From 7106ec2ee1843feda58ad200e0f73b8c44bc0718 Mon Sep 17 00:00:00 2001 From: CodingCarlos Date: Sat, 14 Apr 2018 19:20:46 +0200 Subject: [PATCH] Update string modifier when objects given --- lib/modifiers/type.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/modifiers/type.js b/lib/modifiers/type.js index 6bc96ef..665bcf4 100644 --- a/lib/modifiers/type.js +++ b/lib/modifiers/type.js @@ -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;