fix: iteration output array type causes always outputting string array (#11686)

This commit is contained in:
Joel 2024-12-16 15:06:03 +08:00 committed by GitHub
parent 607a22ad12
commit 41de7e76ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,6 +52,12 @@ const useConfig = (id: string, payload: IterationNodeType) => {
[VarType.number]: VarType.arrayNumber,
[VarType.object]: VarType.arrayObject,
[VarType.file]: VarType.arrayFile,
// list operator node can output array
[VarType.array]: VarType.array,
[VarType.arrayFile]: VarType.arrayFile,
[VarType.arrayString]: VarType.arrayString,
[VarType.arrayNumber]: VarType.arrayNumber,
[VarType.arrayObject]: VarType.arrayObject,
} as Record<VarType, VarType>)[outputItemType] || VarType.arrayString
})
setInputs(newInputs)