Prune unused code
This commit is contained in:
@@ -194,7 +194,7 @@ function registerDefaultHelpers(instance) {
|
||||
instance.log(level, context);
|
||||
});
|
||||
|
||||
instance.registerHelper('lookup', function(obj, field, options) {
|
||||
instance.registerHelper('lookup', function(obj, field) {
|
||||
return obj && obj[field];
|
||||
});
|
||||
}
|
||||
|
||||
@@ -37,8 +37,6 @@ var AST = {
|
||||
this.sexpr = new AST.SexprNode(rawParams, hash);
|
||||
}
|
||||
|
||||
this.sexpr.isRoot = true;
|
||||
|
||||
// Support old AST API that stored this info in MustacheNode
|
||||
this.id = this.sexpr.id;
|
||||
this.params = this.sexpr.params;
|
||||
|
||||
@@ -244,7 +244,7 @@ Compiler.prototype = {
|
||||
id.falsy = true;
|
||||
|
||||
this.ID(id);
|
||||
this.opcode('invokeHelper', params.length, id.original, id.isSimple, sexpr.isRoot);
|
||||
this.opcode('invokeHelper', params.length, id.original, id.isSimple);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -515,7 +515,7 @@ JavaScriptCompiler.prototype = {
|
||||
// and pushes the helper's return value onto the stack.
|
||||
//
|
||||
// If the helper is not found, `helperMissing` is called.
|
||||
invokeHelper: function(paramSize, name, isSimple, isRoot) {
|
||||
invokeHelper: function(paramSize, name, isSimple) {
|
||||
this.aliases.helperMissing = 'helpers.helperMissing';
|
||||
|
||||
var nonHelper = this.popStack();
|
||||
|
||||
@@ -120,9 +120,7 @@ export function template(templateSpec, env) {
|
||||
|
||||
var ret = function(context, options) {
|
||||
options = options || {};
|
||||
var helpers,
|
||||
partials,
|
||||
data = options.data;
|
||||
var data = options.data;
|
||||
|
||||
ret._setup(options);
|
||||
if (!options.partial && templateSpec.useData) {
|
||||
|
||||
Reference in New Issue
Block a user