data should be passed through to partials. closes #111.

This commit is contained in:
Yehuda Katz
2011-12-27 15:57:08 -08:00
parent 69307d0e2b
commit e474e56b80
3 changed files with 29 additions and 4 deletions
+7 -1
View File
@@ -638,7 +638,13 @@ Handlebars.JavaScriptCompiler = function() {};
},
invokePartial: function(context) {
this.pushStack("self.invokePartial(" + this.nameLookup('partials', context, 'partial') + ", '" + context + "', " + this.popStack() + ", helpers, partials);");
params = [this.nameLookup('partials', context, 'partial'), "'" + context + "'", this.popStack(), "helpers", "partials"];
if (this.options.data) {
params.push("data");
}
this.pushStack("self.invokePartial(" + params.join(", ") + ");");
},
assignToHash: function(key) {