make {{> foo bar}} shorthand actually work

(previously, you would get an error about a circular reference while
serializing JSON)
This commit is contained in:
Geoff Schmidt
2011-11-25 23:59:57 -08:00
parent f58e659095
commit c814e34df8

View File

@@ -92,7 +92,7 @@ Handlebars.to_json_ast = function (code) {
throw new Error("Template names shouldn't contain '.' or '/'");
var x = ['>', id[1]];
if (node.context)
x = ['#', ['with', identifier(node.context)], [ret]];
x = ['#', [[0, 'with'], identifier(node.context)], [x]];
ret.push(x);
},
block: function (node) {