From 88c9bfa63906667163b2db9da41ac97018e0cd10 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Jun 2025 21:10:16 +0000 Subject: [PATCH] Fix trailing whitespace in esnext.ts Co-authored-by: weswigham <2932786+weswigham@users.noreply.github.com> --- src/compiler/transformers/esnext.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/transformers/esnext.ts b/src/compiler/transformers/esnext.ts index 7b5aeb3bdd1..2b6ca480e32 100644 --- a/src/compiler/transformers/esnext.ts +++ b/src/compiler/transformers/esnext.ts @@ -319,7 +319,7 @@ export function transformESNext(context: TransformationContext): (x: SourceFile // Wrap the original loop body in an additional block scope to handle shadowing // Don't create an extra block if the original statement is empty or contains only empty statements const isEmptyBlock = isBlock(node.statement) && ( - node.statement.statements.length === 0 || + node.statement.statements.length === 0 || node.statement.statements.every(stmt => stmt.kind === SyntaxKind.EmptyStatement) ); const shouldWrapInBlock = !isEmptyBlock;