From ebda1e4b730e72a731c244aa963ff864a94989dd Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Mon, 8 Dec 2025 10:29:40 -0800 Subject: [PATCH] fix: Don't include 'begin' in label for blocks in the first statement input (#9514) --- core/block_svg.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/block_svg.ts b/core/block_svg.ts index 1a263f702..8daea9ae8 100644 --- a/core/block_svg.ts +++ b/core/block_svg.ts @@ -252,7 +252,15 @@ export class BlockSvg const parentInput = ( this.previousConnection ?? this.outputConnection )?.targetConnection?.getParentInput(); - if (parentInput && parentInput.type === inputTypes.STATEMENT) { + if ( + parentInput && + parentInput.type === inputTypes.STATEMENT && + // The first statement input is redundant with the parent block's label. + parentInput !== + parentInput + .getSourceBlock() + .inputList.find((input) => input.type === inputTypes.STATEMENT) + ) { labelComponents.push(`Begin ${parentInput.getFieldRowLabel()}`); } else if ( parentInput &&