We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 957cf79 commit 88c9bfaCopy full SHA for 88c9bfa
src/compiler/transformers/esnext.ts
@@ -319,7 +319,7 @@ export function transformESNext(context: TransformationContext): (x: SourceFile
319
// Wrap the original loop body in an additional block scope to handle shadowing
320
// Don't create an extra block if the original statement is empty or contains only empty statements
321
const isEmptyBlock = isBlock(node.statement) && (
322
- node.statement.statements.length === 0 ||
+ node.statement.statements.length === 0 ||
323
node.statement.statements.every(stmt => stmt.kind === SyntaxKind.EmptyStatement)
324
);
325
const shouldWrapInBlock = !isEmptyBlock;
0 commit comments