From efa28453bee626bdf6e889dd20ae04408cb37ec0 Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 24 Jul 2025 17:54:22 +0800 Subject: [PATCH] fix: if value show --- web/app/components/workflow/nodes/if-else/node.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) => { )