Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit d7f93c09e7031b28b27296b1e8f8e8bc801e56c9 1 parent 299a0e8
tomhuda authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/handlebars/vm.js
View
4 lib/handlebars/vm.js
@@ -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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.