524
const sha1Computer = this._getSHA1Computer();
525
if (!maintainUndoRedoStack) {
527
>
const initialUndoRedoSnapshot = modelData.model.getInitialUndoRedoSnapshot();
528
>
if (initialUndoRedoSnapshot !== null) {
529
this._undoRedoService.restoreSnapshot(initialUndoRedoSnapshot);
530
}
532
} else if (!sharesUndoRedoStack && (heapSize > maxMemory || !sha1Computer.canComputeSHA1(model))) {
533
// the undo stack for this file would never fit in the configured memory or the file is very large, so don't bother with it.