diff --git a/web/app/components/workflow/nodes/if-else/node.tsx b/web/app/components/workflow/nodes/if-else/node.tsx index c77286d3cd..7cd62043ff 100644 --- a/web/app/components/workflow/nodes/if-else/node.tsx +++ b/web/app/components/workflow/nodes/if-else/node.tsx @@ -7,6 +7,7 @@ import { isEmptyRelatedOperator } from './utils' import type { Condition, IfElseNodeType } from './types' import ConditionValue from './components/condition-value' import ConditionFilesListValue from './components/condition-files-list-value' +import { VarType } from '../../types' const i18nPrefix = 'workflow.nodes.ifElse' const IfElseNode: FC> = (props) => { @@ -26,15 +27,14 @@ const IfElseNode: FC> = (props) => { if (isEmptyRelatedOperator(c.comparison_operator!)) return true - return typeof c.value === 'boolean' ? true : !!c.value + return c.varType === VarType.boolean ? true : !!c.value }) return isSet } else { if (isEmptyRelatedOperator(condition.comparison_operator!)) return true - - return typeof condition.value === 'boolean' ? true : !!condition.value + return condition.varType === VarType.boolean ? true : !!condition.value } }, []) const conditionNotSet = (
@@ -73,7 +73,7 @@ const IfElseNode: FC> = (props) => { )