4.8.13 test (#3102)
* fix: loop index;edge parent check * perf: reference invalid check * fix: ts
This commit is contained in:
@@ -201,6 +201,7 @@ export enum NodeInputKeyEnum {
|
||||
nodeHeight = 'nodeHeight',
|
||||
// loop start
|
||||
loopStartInput = 'loopStartInput',
|
||||
loopStartIndex = 'loopStartIndex',
|
||||
// loop end
|
||||
loopEndInput = 'loopEndInput',
|
||||
|
||||
@@ -258,7 +259,7 @@ export enum NodeOutputKeyEnum {
|
||||
loopArray = 'loopArray',
|
||||
// loop start
|
||||
loopStartInput = 'loopStartInput',
|
||||
loopArrayIndex = 'loopArrayIndex',
|
||||
loopStartIndex = 'loopStartIndex',
|
||||
|
||||
// form input
|
||||
formInputResult = 'formInputResult'
|
||||
|
||||
@@ -239,7 +239,7 @@ export const getReferenceVariableValue = ({
|
||||
nodes: RuntimeNodeItemType[];
|
||||
variables: Record<string, any>;
|
||||
}) => {
|
||||
if (!value) return undefined;
|
||||
if (!value) return value;
|
||||
|
||||
// handle single reference value
|
||||
if (isValidReferenceValueFormat(value)) {
|
||||
@@ -253,7 +253,7 @@ export const getReferenceVariableValue = ({
|
||||
|
||||
const node = nodes.find((node) => node.nodeId === sourceNodeId);
|
||||
if (!node) {
|
||||
return undefined;
|
||||
return value;
|
||||
}
|
||||
|
||||
return node.outputs.find((output) => output.id === outputId)?.value;
|
||||
|
||||
@@ -33,12 +33,18 @@ export const LoopStartNode: FlowNodeTemplateType = {
|
||||
label: '',
|
||||
required: true,
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
key: NodeInputKeyEnum.loopStartIndex,
|
||||
renderTypeList: [FlowNodeInputTypeEnum.hidden],
|
||||
valueType: WorkflowIOValueTypeEnum.number,
|
||||
label: i18nT('workflow:Array_element_index')
|
||||
}
|
||||
],
|
||||
outputs: [
|
||||
{
|
||||
id: NodeOutputKeyEnum.loopArrayIndex,
|
||||
key: NodeOutputKeyEnum.loopArrayIndex,
|
||||
id: NodeOutputKeyEnum.loopStartIndex,
|
||||
key: NodeOutputKeyEnum.loopStartIndex,
|
||||
label: i18nT('workflow:Array_element_index'),
|
||||
type: FlowNodeOutputTypeEnum.static,
|
||||
valueType: WorkflowIOValueTypeEnum.number
|
||||
|
||||
Reference in New Issue
Block a user