Subclasses should be able to replace the compiler - this is needed so that child views are compiled using the updated semantics of the parent compiler

This commit is contained in:
tomhuda
2011-02-11 20:11:52 -08:00
parent 299a0e81e3
commit d7f93c09e7
+3 -1
View File
@@ -523,13 +523,15 @@ Handlebars.JavaScriptCompiler = function() {};
// HELPERS
compiler: JavaScriptCompiler,
compileChildren: function(environment, data) {
var children = environment.children, child, compiler;
var compiled = [];
for(var i=0, l=children.length; i<l; i++) {
child = children[i];
compiler = new JavaScriptCompiler();
compiler = new this.compiler();
compiled[i] = compiler.compile(child, data);
}