소스 검색

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

tags/1.4.0
Joel 5 달 전
부모
커밋
486a66be54
No account linked to committer's email address
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3
    2
      web/app/components/workflow/nodes/_base/components/variable/utils.ts

+ 3
- 2
web/app/components/workflow/nodes/_base/components/variable/utils.ts 파일 보기

@@ -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)

Loading…
취소
저장