From 41de7e76ecafddd61028d53dd7f5ea045d7e0ae1 Mon Sep 17 00:00:00 2001 From: Joel Date: Mon, 16 Dec 2024 15:06:03 +0800 Subject: [PATCH] fix: iteration output array type causes always outputting string array (#11686) --- web/app/components/workflow/nodes/iteration/use-config.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/app/components/workflow/nodes/iteration/use-config.ts b/web/app/components/workflow/nodes/iteration/use-config.ts index 6fb8797dcd..fd69fecaf0 100644 --- a/web/app/components/workflow/nodes/iteration/use-config.ts +++ b/web/app/components/workflow/nodes/iteration/use-config.ts @@ -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)[outputItemType] || VarType.arrayString }) setInputs(newInputs)