aboutsummaryrefslogtreecommitdiff
path: root/lib/ast.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ast.js')
-rw-r--r--lib/ast.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ast.js b/lib/ast.js
index 177bd1d7..44cbed12 100644
--- a/lib/ast.js
+++ b/lib/ast.js
@@ -929,10 +929,10 @@ TreeWalker.prototype = {
} else {
for (var i = stack.length; --i >= 0;) {
var x = stack[i];
- if (x instanceof AST_Switch) return x;
- if (x instanceof AST_For || x instanceof AST_ForIn || x instanceof AST_DWLoop) {
- return (x.body instanceof AST_BlockStatement ? x.body : x);
- }
+ if (x instanceof AST_Switch
+ || x instanceof AST_For
+ || x instanceof AST_ForIn
+ || x instanceof AST_DWLoop) return x;
}
}
}