From e658beee389108da6b3f0269a44cba12e5b4a150 Mon Sep 17 00:00:00 2001 From: balibabu Date: Wed, 5 Nov 2025 19:15:43 +0800 Subject: [PATCH] Fix: Fixed the issue of errors when using agents created from templates. #10427 (#11035) ### What problem does this PR solve? Fix: Fixed the issue of errors when using agents created from templates. #10427 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- web/src/pages/agent/store.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/src/pages/agent/store.ts b/web/src/pages/agent/store.ts index 75fc06f48..d71bf68c2 100644 --- a/web/src/pages/agent/store.ts +++ b/web/src/pages/agent/store.ts @@ -105,7 +105,10 @@ const useGraphStore = create()( clickedToolId: '', onNodesChange: (changes) => { set({ - nodes: applyNodeChanges(changes, get().nodes), + nodes: applyNodeChanges( + changes, // The issue of errors when using templates was resolved by using cloneDeep. + cloneDeep(get().nodes) as RAGFlowNodeType[], // Cannot assign to read only property 'width' of object '#' + ), }); }, onEdgesChange: (changes: EdgeChange[]) => {