Procházet zdrojové kódy

fix: item data type wrong in iteration (#19709)

tags/1.4.0
Joel před 5 měsíci
rodič
revize
486a66be54
Žádný účet není propojen s e-mailovou adresou tvůrce revize

+ 3
- 2
web/app/components/workflow/nodes/_base/components/variable/utils.ts Zobrazit soubor

@@ -613,6 +613,7 @@ const getIterationItemType = ({
const isSystem = isSystemVar(valueSelector)

const targetVar = isSystem ? beforeNodesOutputVars.find(v => v.isStartNode) : beforeNodesOutputVars.find(v => v.nodeId === outputVarNodeId)

if (!targetVar)
return VarType.string

@@ -623,9 +624,9 @@ const getIterationItemType = ({
arrayType = curr.find((v: any) => v.variable === (valueSelector).join('.'))?.type
}
else {
for (let i = 1; i < valueSelector.length - 1; i++) {
for (let i = 1; i < valueSelector.length; 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) : []

if (isLast)

Načítá se…
Zrušit
Uložit