From 901cd6d7b461acf51c518ed76ea5225832ff5229 Mon Sep 17 00:00:00 2001 From: GuanMu Date: Tue, 15 Jul 2025 10:42:26 +0000 Subject: [PATCH] fix: Correct the logic for obtaining variable types in conditional items to ensure proper parsing --- .../if-else/components/condition-list/condition-item.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/app/components/workflow/nodes/if-else/components/condition-list/condition-item.tsx b/web/app/components/workflow/nodes/if-else/components/condition-list/condition-item.tsx index 96fbc47ccd..775f232fd0 100644 --- a/web/app/components/workflow/nodes/if-else/components/condition-list/condition-item.tsx +++ b/web/app/components/workflow/nodes/if-else/components/condition-list/condition-item.tsx @@ -197,7 +197,7 @@ const ConditionItem = ({ }, [caseId, condition, conditionId, isSubVariableKey, onRemoveCondition, onRemoveSubVariableCondition]) const handleVarChange = useCallback((valueSelector: ValueSelector, varItem: Var) => { - const actualVarType = getVarType({ + const resolvedVarType = getVarType({ valueSelector, availableNodes, isChatMode, @@ -205,9 +205,9 @@ const ConditionItem = ({ const newCondition = produce(condition, (draft) => { draft.variable_selector = valueSelector - draft.varType = actualVarType + draft.varType = resolvedVarType draft.value = '' - draft.comparison_operator = getOperators(actualVarType)[0] + draft.comparison_operator = getOperators(resolvedVarType)[0] }) doUpdateCondition(newCondition) setOpen(false)