Merge pull request #310 from redpie/fix-registerPartial-data

Ensure plain text partials supplied to registerPartials are compiled using data: true if necessary.
This commit is contained in:
Yehuda Katz
2012-09-14 20:25:10 -07:00
+1 -1
View File
@@ -56,7 +56,7 @@ Handlebars.VM = {
} else if (!Handlebars.compile) {
throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode");
} else {
partials[name] = Handlebars.compile(partial);
partials[name] = Handlebars.compile(partial, {data: data !== undefined});
return partials[name](context, options);
}
}