Skip to content

Commit 601dc4b

Browse files
fix: reset currentSelectedNodes in clearHistory() and add missing review fixes
- Reset currentSelectedNodes to [] so stale selection IDs from the previous diagram cannot corrupt undo/redo selection restoration after a refresh + clearHistory() call. - (types updated in next commit to mark clearHistory as optional)
1 parent e6e688b commit 601dc4b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/plugin/operationHistory.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export default function (mei: MindElixirInstance) {
9292
history = []
9393
currentIndex = -1
9494
current = mei.getData()
95+
currentSelectedNodes = []
9596
}
9697
const handleOperation = function (operation: Operation) {
9798
if (operation.name === 'beginEdit') return

0 commit comments

Comments
 (0)