From 72cb5328ee58307ccb9bc91ac5826c3a41aac4d2 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Fri, 12 Oct 2012 10:49:41 +0300 Subject: [PATCH] fix in_boolean_context() (two tests were broken) --- lib/ast.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ast.js b/lib/ast.js index f90223ec..689e956b 100644 --- a/lib/ast.js +++ b/lib/ast.js @@ -904,7 +904,7 @@ TreeWalker.prototype = { }, in_boolean_context: function() { var stack = this.stack; - var i = stack.length, self = stack[--i]; + var i = stack.length, self = stack[--i].$self; while (i > 0) { var p = stack[--i]; if ((p instanceof AST_If && p.condition === self) || @@ -917,7 +917,7 @@ TreeWalker.prototype = { } if (!(p instanceof AST_Binary && (p.operator == "&&" || p.operator == "||"))) return false; - self = p; + self = p.$self; } }, loopcontrol_target: function(label) { -- 2.34.1