Vanessa 2022-08-10 10:42:14 +08:00
parent a82fde6598
commit c358f8f8ee

View file

@ -64,7 +64,9 @@ class Undo {
}
public replace(doOperations: IOperation[]) {
this.undoStack[this.undoStack.length - 1].doOperations = doOperations;
if (this.undoStack.length > 0) {
this.undoStack[this.undoStack.length - 1].doOperations = doOperations;
}
}
public add( doOperations: IOperation[], undoOperations: IOperation[]) {