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 c56ecf4a1a..abc7904244 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 @@ -128,14 +128,14 @@ const ConditionItem = ({ return undefined }, [condition.key, file, isSubVariableKey]) - const isTransferMethod = fileAttr?.key === 'transfer_method' + const isArrayValue = fileAttr?.key === 'transfer_method' || fileAttr?.key === 'type' const handleUpdateConditionValue = useCallback((value: string) => { - if (value === condition.value || (isTransferMethod && value === condition.value?.[0])) + if (value === condition.value || (isArrayValue && value === condition.value?.[0])) return const newCondition = { ...condition, - value: isTransferMethod ? [value] : value, + value: isArrayValue ? [value] : value, } doUpdateCondition(newCondition) }, [condition, doUpdateCondition, fileAttr]) @@ -273,7 +273,7 @@ const ConditionItem = ({ handleChange('value')(item.value)} className='!text-[13px]' wrapperClassName='grow h-8'