diff --git a/src/renderer/components/HistoryProvider.tsx b/src/renderer/components/HistoryProvider.tsx index cc33874dd..37c4ddd0f 100644 --- a/src/renderer/components/HistoryProvider.tsx +++ b/src/renderer/components/HistoryProvider.tsx @@ -102,7 +102,10 @@ export const HistoryProvider = memo( if (selfUpdate) return noop; const id = setTimeout(() => { - historyRef.current = historyRef.current.commit([getNodes(), getEdges()]); + historyRef.current = historyRef.current.commit([ + getNodes().map((n) => ({ ...n, selected: false })), + getEdges(), + ]); }, 250); return () => clearTimeout(id); // eslint-disable-next-line react-hooks/exhaustive-deps