minor cleanup (#3723)
authorAlex Lam S.L <alexlamsl@gmail.com>
Sat, 15 Feb 2020 17:55:26 +0000 (17:55 +0000)
committerGitHub <noreply@github.com>
Sat, 15 Feb 2020 17:55:26 +0000 (17:55 +0000)
lib/ast.js

index 99e2353..a3b8021 100644 (file)
@@ -169,10 +169,7 @@ var AST_SimpleStatement = DEFNODE("SimpleStatement", "body", {
 }, AST_Statement);
 
 function walk_body(node, visitor) {
-    var body = node.body;
-    if (body instanceof AST_Statement) {
-        body._walk(visitor);
-    } else body.forEach(function(node) {
+    node.body.forEach(function(node) {
         node._walk(visitor);
     });
 }