fix: item data type wrong in iteration (#19709)
This commit is contained in:
parent
dd4419fd5e
commit
486a66be54
1 changed files with 3 additions and 2 deletions
|
|
@ -613,6 +613,7 @@ const getIterationItemType = ({
|
||||||
const isSystem = isSystemVar(valueSelector)
|
const isSystem = isSystemVar(valueSelector)
|
||||||
|
|
||||||
const targetVar = isSystem ? beforeNodesOutputVars.find(v => v.isStartNode) : beforeNodesOutputVars.find(v => v.nodeId === outputVarNodeId)
|
const targetVar = isSystem ? beforeNodesOutputVars.find(v => v.isStartNode) : beforeNodesOutputVars.find(v => v.nodeId === outputVarNodeId)
|
||||||
|
|
||||||
if (!targetVar)
|
if (!targetVar)
|
||||||
return VarType.string
|
return VarType.string
|
||||||
|
|
||||||
|
|
@ -623,9 +624,9 @@ const getIterationItemType = ({
|
||||||
arrayType = curr.find((v: any) => v.variable === (valueSelector).join('.'))?.type
|
arrayType = curr.find((v: any) => v.variable === (valueSelector).join('.'))?.type
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (let i = 1; i < valueSelector.length - 1; i++) {
|
for (let i = 1; i < valueSelector.length; i++) {
|
||||||
const key = valueSelector[i]
|
const key = valueSelector[i]
|
||||||
const isLast = i === valueSelector.length - 2
|
const isLast = i === valueSelector.length - 1
|
||||||
curr = Array.isArray(curr) ? curr.find(v => v.variable === key) : []
|
curr = Array.isArray(curr) ? curr.find(v => v.variable === key) : []
|
||||||
|
|
||||||
if (isLast)
|
if (isLast)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue