Skip to content

Commit

Permalink
Prune unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
kpdecker committed Aug 26, 2014
1 parent dfca676 commit ca1486b
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/handlebars/base.js
Expand Up @@ -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];
});
}
Expand Down
2 changes: 0 additions & 2 deletions lib/handlebars/compiler/ast.js
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/handlebars/compiler/compiler.js
Expand Up @@ -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);
}
},

Expand Down
2 changes: 1 addition & 1 deletion lib/handlebars/compiler/javascript-compiler.js
Expand Up @@ -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();
Expand Down
4 changes: 1 addition & 3 deletions lib/handlebars/runtime.js
Expand Up @@ -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) {
Expand Down

0 comments on commit ca1486b

Please sign in to comment.