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)
This commit is contained in:
balibabu
2025-10-31 14:46:03 +08:00
committed by GitHub
parent d8a7fb6f2b
commit e9debfd74d

View File

@ -476,14 +476,13 @@ const useGraphStore = create<RFState>()(
},
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;
}),
});
}
},