Fix ungrouped undo-redo

This commit is contained in:
Chen-I Lim 2020-11-16 10:37:29 -08:00
parent a335ad18ff
commit ba052ac305

View file

@ -137,6 +137,7 @@ class UndoManager {
} while (this.index >= 0 && currentGroupId === command.groupId)
} else {
await this.execute(command, 'undo')
this.index -= 1
}
if (this.onStateDidChange) {
@ -165,6 +166,7 @@ class UndoManager {
} while (this.index < this.commands.length - 1 && currentGroupId === command.groupId)
} else {
await this.execute(command, 'redo')
this.index += 1
}
if (this.onStateDidChange) {