mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
fix: Don't include 'begin' in label for blocks in the first statement input (#9514)
This commit is contained in:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user