diff --git a/packages/handlebars/parse.js b/packages/handlebars/parse.js index e1c3d72ddb..6ba6879090 100644 --- a/packages/handlebars/parse.js +++ b/packages/handlebars/parse.js @@ -76,7 +76,7 @@ Handlebars.to_json_ast = function (code) { var choices = { ID: function (node) {return identifier(node);}, - STRING: function (node) {return ''+node.string;}, + STRING: function (node) {return node.string;}, INTEGER: function (node) {return +node.integer;}, BOOLEAN: function (node) {return (node.bool === 'true');} }; diff --git a/packages/templating/templating_tests.js b/packages/templating/templating_tests.js index f13986e233..e56f031003 100644 --- a/packages/templating/templating_tests.js +++ b/packages/templating/templating_tests.js @@ -1028,8 +1028,7 @@ Tinytest.add('templating - helper typecast Issue #617', function (test) { "[number,0][number,1][number,-1][number,10][number,-10]" + // errors "[undefined,undefined][undefined,undefined]" + - // for some reason handlebars has an extra argument. this is an - // internal detail. if it changes, just change this test. + // handlebars 'options' argument. appended to args of all helpers. "[object]"); });