From e9debfd74d3814fd55d979d448f60dfb606a1b0b Mon Sep 17 00:00:00 2001 From: balibabu Date: Fri, 31 Oct 2025 14:46:03 +0800 Subject: [PATCH] Fix: The nodes on the canvas were not updated in time after the operator name was modified. #10866 (#10911) ### What problem does this PR solve? Fix: The nodes on the canvas were not updated in time after the operator name was modified. #10866 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- web/src/pages/agent/store.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/web/src/pages/agent/store.ts b/web/src/pages/agent/store.ts index dbfbf1eb0..50046bde6 100644 --- a/web/src/pages/agent/store.ts +++ b/web/src/pages/agent/store.ts @@ -476,14 +476,13 @@ const useGraphStore = create()( }, updateNodeName: (id, name) => { if (id) { - set({ - nodes: get().nodes.map((node) => { + set((state) => { + for (const node of state.nodes) { if (node.id === id) { node.data.name = name; + break; } - - return node; - }), + } }); } },