Fix Loop block parameters (#1492)
This commit is contained in:
@@ -368,14 +368,14 @@ function convertToNode(
|
||||
const loopVariableReference =
|
||||
block.loop_variable_reference !== null
|
||||
? block.loop_variable_reference
|
||||
: block.loop_over.key;
|
||||
: block.loop_over?.key ?? "";
|
||||
return {
|
||||
...identifiers,
|
||||
...common,
|
||||
type: "loop",
|
||||
data: {
|
||||
...commonData,
|
||||
loopValue: block.loop_over.key,
|
||||
loopValue: block.loop_over?.key ?? "",
|
||||
loopVariableReference: loopVariableReference,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -142,8 +142,8 @@ class ForLoopBlockYAML(BlockYAML):
|
||||
# to infer the type of the parameter_type attribute.
|
||||
block_type: Literal[BlockType.FOR_LOOP] = BlockType.FOR_LOOP # type: ignore
|
||||
|
||||
loop_over_parameter_key: str
|
||||
loop_blocks: list["BLOCK_YAML_SUBCLASSES"]
|
||||
loop_over_parameter_key: str = ""
|
||||
loop_variable_reference: str | None = None
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user