Use local vars
This commit is contained in:
@@ -1234,8 +1234,8 @@ Handlebars.precompile = function(input, options) {
|
||||
options.data = true;
|
||||
}
|
||||
var ast = Handlebars.parse(input);
|
||||
var environment = new Handlebars.Compiler().compile(ast, options);
|
||||
return new Handlebars.JavaScriptCompiler().compile(environment, options);
|
||||
var environment = new Compiler().compile(ast, options);
|
||||
return new JavaScriptCompiler().compile(environment, options);
|
||||
};
|
||||
|
||||
Handlebars.compile = function(input, options) {
|
||||
@@ -1250,8 +1250,8 @@ Handlebars.compile = function(input, options) {
|
||||
var compiled;
|
||||
function compile() {
|
||||
var ast = Handlebars.parse(input);
|
||||
var environment = new Handlebars.Compiler().compile(ast, options);
|
||||
var templateSpec = new Handlebars.JavaScriptCompiler().compile(environment, options, undefined, true);
|
||||
var environment = new Compiler().compile(ast, options);
|
||||
var templateSpec = new JavaScriptCompiler().compile(environment, options, undefined, true);
|
||||
return Handlebars.template(templateSpec);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user