From 234ed25656cc00771d39726d51af78c7ee71d046 Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 23 Jan 2025 14:06:00 +0800 Subject: [PATCH] fix: get property og string type cause page crash --- .../workflow/nodes/_base/components/variable/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/app/components/workflow/nodes/_base/components/variable/utils.ts b/web/app/components/workflow/nodes/_base/components/variable/utils.ts index 715ad1c7b1..36cb3348df 100644 --- a/web/app/components/workflow/nodes/_base/components/variable/utils.ts +++ b/web/app/components/workflow/nodes/_base/components/variable/utils.ts @@ -546,7 +546,8 @@ export const getVarType = ({ else { (valueSelector as ValueSelector).slice(1).forEach((key, i) => { const isLast = i === valueSelector.length - 2 - curr = curr?.find((v: any) => v.variable === key) + if (Array.isArray(curr)) + curr = curr?.find((v: any) => v.variable === key) if (isLast) { type = curr?.type }