ソースを参照

fix: i.find is not a function (#18945)

tags/1.3.1
crazywoola 6ヶ月前
コミット
03ac2d0f17
コミッターのメールアドレスに関連付けられたアカウントが存在しません
1個のファイルの変更10行の追加11行の削除
  1. 10
    11
      web/app/components/workflow/nodes/_base/components/variable/utils.ts

+ 10
- 11
web/app/components/workflow/nodes/_base/components/variable/utils.ts ファイルの表示

@@ -596,17 +596,16 @@ const getIterationItemType = ({
arrayType = curr.find((v: any) => v.variable === (valueSelector).join('.'))?.type
}
else {
(valueSelector).slice(1).forEach((key, i) => {
for (let i = 1; i < valueSelector.length - 1; i++) {
const key = valueSelector[i]
const isLast = i === valueSelector.length - 2
curr = curr?.find((v: any) => v.variable === key)
if (isLast) {
arrayType = curr?.type
}
else {
if (curr?.type === VarType.object || curr?.type === VarType.file)
curr = curr.children
}
})
curr = Array.isArray(curr) ? curr.find(v => v.variable === key) : []

if (isLast)
arrayType = curr?.type
else if (curr?.type === VarType.object || curr?.type === VarType.file)
curr = curr.children || []
}
}

switch (arrayType as VarType) {
@@ -631,7 +630,7 @@ const getLoopItemType = ({
}: {
valueSelector: ValueSelector
beforeNodesOutputVars: NodeOutPutVar[]
// eslint-disable-next-line sonarjs/no-identical-functions
}): VarType => {
const outputVarNodeId = valueSelector[0]
const isSystem = isSystemVar(valueSelector)

読み込み中…
キャンセル
保存