Improve Handlebars subclassability
This commit is contained in:
@@ -53,6 +53,8 @@ Handlebars.JavaScriptCompiler = function() {};
|
||||
};
|
||||
|
||||
Compiler.prototype = {
|
||||
compiler: Compiler,
|
||||
|
||||
disassemble: function() {
|
||||
var opcodes = this.opcodes, opcode, nextCode;
|
||||
var out = [], str, name, value;
|
||||
@@ -119,7 +121,7 @@ Handlebars.JavaScriptCompiler = function() {};
|
||||
},
|
||||
|
||||
compileProgram: function(program) {
|
||||
var result = new Compiler().compile(program, this.options);
|
||||
var result = new this.compiler().compile(program, this.options);
|
||||
var guid = this.guid++;
|
||||
|
||||
this.usePartial = this.usePartial || result.usePartial;
|
||||
|
||||
Reference in New Issue
Block a user