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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user