From 67573d37e5d6488febc65a4604a26c3f98e60dc9 Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Sat, 15 Feb 2020 22:11:20 +0800 Subject: [PATCH] minor cleanup --- lib/ast.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/ast.js b/lib/ast.js index 99e2353e..a3b80214 100644 --- a/lib/ast.js +++ b/lib/ast.js @@ -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); }); }