Skip to content

Commit

Permalink
Fix ProgramNode parameter handling under IE
Browse files Browse the repository at this point in the history
  • Loading branch information
kpdecker committed Dec 29, 2013
1 parent 6c2137a commit 14d1d42
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/handlebars/compiler/ast.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ var AST = {
ProgramNode: function(statements, inverseStrip, inverse, locInfo) {
var inverseLocationInfo, firstInverseNode;
if (arguments.length === 3) {
locInfo = inverse;
inverse = null;
locInfo = arguments[arguments.length - 1];
} else if (arguments.length === 2 ) {
locInfo = arguments[1];
} else if (arguments.length === 2) {
locInfo = inverseStrip;
inverseStrip = null;
}

LocationInfo.call(this, locInfo);
this.type = "program";
this.statements = statements;
Expand Down

0 comments on commit 14d1d42

Please sign in to comment.