diff --git a/src/utils.js b/src/utils.js index 1e682ec..b6a6a47 100644 --- a/src/utils.js +++ b/src/utils.js @@ -215,7 +215,11 @@ const Template7Utils = { else variable = undefined; }); } - if (typeof variable === 'string') { + if ( + (typeof variable === 'string') + || Array.isArray(variable) + || (variable.constructor && variable.constructor === Object) + ) { variable = JSON.stringify(variable); } if (variable === undefined) variable = 'undefined'; @@ -223,6 +227,7 @@ const Template7Utils = { arr.push(variable); return arr; }, []).join(''); + }, parseJsParents(expression, parents) { return expression.split(/([+ \-*^()&=|<>!%:?])/g).reduce((arr, part) => {