aboutsummaryrefslogtreecommitdiff
path: root/lib/ast.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-02-15 17:55:26 +0000
committerGitHub <noreply@github.com>2020-02-15 17:55:26 +0000
commit5315dd95b0402b656d07660b705b27a0404183d4 (patch)
tree568752e9bb3d64437dd32cd6d7f725506b90efa5 /lib/ast.js
parent31a7bf2a22f7e9cfa3ec309cdff626a2ea228aab (diff)
downloadtracifyjs-5315dd95b0402b656d07660b705b27a0404183d4.tar.gz
tracifyjs-5315dd95b0402b656d07660b705b27a0404183d4.zip
minor cleanup (#3723)
Diffstat (limited to 'lib/ast.js')
-rw-r--r--lib/ast.js5
1 files changed, 1 insertions, 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);
});
}