diff --git a/lib/utils.js b/lib/utils.js index b492330..0d0be9d 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -17,7 +17,7 @@ if(typeof events.EventEmitter.prototype.once !== 'function') { // uses comma separator so won't work for types like box that use // a different array separator. function arrayString(val) { - var result = '{' + var result = '{'; for (var i = 0 ; i < val.length; i++) { if (i > 0) result = result + ','; @@ -31,7 +31,7 @@ function arrayString(val) { result = result + arrayString(val[i]); } else - result = result + + result = result + (val[i] === null ? 'NULL' : JSON.stringify(val[i])); } result = result + '}'; @@ -50,7 +50,7 @@ var prepareValue = function(val) { return null; } if (Array.isArray(val)) { - return arrayString(val); + return arrayString(val); } return val === null ? null : val.toString(); };