diff --git a/src/nodes/ForStatement.ts b/src/nodes/ForStatement.ts index cf5cd47..71745d0 100644 --- a/src/nodes/ForStatement.ts +++ b/src/nodes/ForStatement.ts @@ -33,8 +33,9 @@ export default class ForStatement { visitor.visitNode(node.update); } - if (body) + if (body && node.body.type !== 'ExpressionStatement') { return body; + } } } } \ No newline at end of file