fix: multiple entry blocks detected on nested loops (#4422)
This commit is contained in:
@@ -2398,11 +2398,14 @@ function getOrderedChildrenBlocks(
|
|||||||
edges,
|
edges,
|
||||||
currentNode.id,
|
currentNode.id,
|
||||||
);
|
);
|
||||||
|
// Compute next_block_label for nested loops (same as regular blocks)
|
||||||
|
const nextBlockLabel = findNextBlockLabel(currentNode.id, nodes, edges);
|
||||||
children.push({
|
children.push({
|
||||||
block_type: "for_loop",
|
block_type: "for_loop",
|
||||||
label: currentNode.data.label,
|
label: currentNode.data.label,
|
||||||
continue_on_failure: currentNode.data.continueOnFailure,
|
continue_on_failure: currentNode.data.continueOnFailure,
|
||||||
next_loop_on_failure: currentNode.data.nextLoopOnFailure,
|
next_loop_on_failure: currentNode.data.nextLoopOnFailure,
|
||||||
|
next_block_label: nextBlockLabel,
|
||||||
loop_blocks: loopChildren,
|
loop_blocks: loopChildren,
|
||||||
loop_variable_reference: currentNode.data.loopVariableReference,
|
loop_variable_reference: currentNode.data.loopVariableReference,
|
||||||
complete_if_empty: currentNode.data.completeIfEmpty,
|
complete_if_empty: currentNode.data.completeIfEmpty,
|
||||||
|
|||||||
Reference in New Issue
Block a user