data is passed to block helpers

This commit is contained in:
tomhuda
2011-02-11 20:11:23 -08:00
parent e719f79259
commit 299a0e81e3
2 changed files with 22 additions and 0 deletions
+5
View File
@@ -499,6 +499,11 @@ Handlebars.JavaScriptCompiler = function() {};
params.push(mainProgram, inverse);
blockMissingParams.push(mainProgram, inverse);
if(this.data) {
params.push("data");
blockMissingParams.push("data");
}
var nextStack = this.nextStack();
this.source.push("if(typeof " + id + " === 'function') { " + nextStack + " = " + id + ".call(" + params.join(", ") + "); }");