diff --git a/helpers/3p/object.js b/helpers/3p/object.js index 2f2bf95..da75389 100644 --- a/helpers/3p/object.js +++ b/helpers/3p/object.js @@ -194,7 +194,10 @@ helpers.merge = function(context/*, objects, options*/) { */ helpers.JSONparse = function(str, options) { - return options.fn(JSON.parse(str)); + if (options.fn) { + return options.fn(JSON.parse(str)); + } + return JSON.parse(str); }; /** @@ -217,4 +220,4 @@ helpers.JSONstringify = function(obj, indent) { * deprecated in a future release */ -helpers.stringify = helpers.JSONstringify; \ No newline at end of file +helpers.stringify = helpers.JSONstringify;