Comparing version 1.4.0 to 1.4.1
@@ -266,2 +266,13 @@ "use strict"; | ||
nodeHandlers.else = function(node, context) { | ||
// The parser has already taken care of it. | ||
return { | ||
content: new utilities.CodeContext(), | ||
attributes: new utilities.CodeContext(), | ||
scope: context.scope, | ||
parent: context, | ||
done: function() {} | ||
}; | ||
}; | ||
nodeHandlers.for = function(node, context) { | ||
@@ -268,0 +279,0 @@ var indexName = context.scope.createName("index"); |
{ | ||
"name": "razorleaf", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"main": "razorleaf.js", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -356,7 +356,7 @@ "use strict"; | ||
begin: function() { | ||
this.context.parent.children.splice(-1, 1); | ||
this.context.parent.children.pop(); | ||
var previous = this.context.parent.children[this.context.parent.children.length - 1]; | ||
var previous = this.context.parent.children[this.context.parent.children.length - 2]; | ||
if(previous.type !== "if") { | ||
if(!previous || previous.type !== "if" || previous.else) { | ||
throw this.error("Unexpected else"); | ||
@@ -363,0 +363,0 @@ } |
29934
930