From 411c39b1482e2ab24a05ac0aaec400688e9225ab Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Thu, 6 Mar 2025 21:36:58 +0800 Subject: [PATCH] fix: #485 --- ui/src/domain/workflow.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/src/domain/workflow.ts b/ui/src/domain/workflow.ts index 30dab060..6b8543f0 100644 --- a/ui/src/domain/workflow.ts +++ b/ui/src/domain/workflow.ts @@ -270,7 +270,16 @@ export const updateNode = (node: WorkflowNode, targetNode: WorkflowNode) => { let current = draft; while (current) { if (current.id === targetNode.id) { - Object.assign(current, targetNode); + // Object.assign(current, targetNode); + // TODO: 暂时这么处理,避免 #485 #489,后续再优化 + current.type = targetNode.type; + current.name = targetNode.name; + current.config = targetNode.config; + current.inputs = targetNode.inputs; + current.outputs = targetNode.outputs; + current.next = targetNode.next; + current.branches = targetNode.branches; + current.validated = targetNode.validated; break; }