summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/handlebars/compiler/ast.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/handlebars/compiler/ast.js b/lib/handlebars/compiler/ast.js
index 88d64e3..b6c3a03 100644
--- a/lib/handlebars/compiler/ast.js
+++ b/lib/handlebars/compiler/ast.js
@@ -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;