Ensure plain text partials supplied to registerPartials are compiled using data: true if necessary.

This commit is contained in:
Kiall Mac Innes
2012-09-13 15:04:34 +01:00
parent 5a6e4f1ddd
commit 967c69b2da
+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);
}
}