From 58524d6d2b93c11c6a9a779624d58268b290e7af Mon Sep 17 00:00:00 2001 From: Guangdong Liu Date: Fri, 17 Oct 2025 09:11:03 +0800 Subject: [PATCH] fix: remove unnecessary properties from condition draft (#27009) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- .../nodes/if-else/components/condition-list/condition-item.tsx | 3 +++ .../nodes/loop/components/condition-list/condition-item.tsx | 3 +++ 2 files changed, 6 insertions(+) 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 1a76622c57..252c9a7d77 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 @@ -234,6 +234,9 @@ const ConditionItem = ({ draft.varType = resolvedVarType draft.value = resolvedVarType === VarType.boolean ? false : '' draft.comparison_operator = getOperators(resolvedVarType)[0] + delete draft.key + delete draft.sub_variable_condition + delete draft.numberVarType setTimeout(() => setControlPromptEditorRerenderKey(Date.now())) }) doUpdateCondition(newCondition) diff --git a/web/app/components/workflow/nodes/loop/components/condition-list/condition-item.tsx b/web/app/components/workflow/nodes/loop/components/condition-list/condition-item.tsx index 6e573093b7..4de07cc3da 100644 --- a/web/app/components/workflow/nodes/loop/components/condition-list/condition-item.tsx +++ b/web/app/components/workflow/nodes/loop/components/condition-list/condition-item.tsx @@ -196,6 +196,9 @@ const ConditionItem = ({ draft.varType = varItem.type draft.value = '' draft.comparison_operator = getOperators(varItem.type)[0] + delete draft.key + delete draft.sub_variable_condition + delete draft.numberVarType }) doUpdateCondition(newCondition) setOpen(false)