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[]) => {