Skip to content

Commit

Permalink
fix(for-stmts): do not return if body type is ExpressionStatement
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanRT committed Aug 24, 2022
1 parent ebe0b99 commit 7e43562
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nodes/ForStatement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ export default class ForStatement {
visitor.visitNode(node.update);
}

if (body)
if (body && node.body.type !== 'ExpressionStatement') {
return body;
}
}
}
}

0 comments on commit 7e43562

Please sign in to comment.