diff --git a/v3/src/models/app-state.ts b/v3/src/models/app-state.ts index 3558498d2..408601dec 100644 --- a/v3/src/models/app-state.ts +++ b/v3/src/models/app-state.ts @@ -54,10 +54,15 @@ class AppState { async getDocumentSnapshot() { // use cloneDeep because MST snapshots are immutable const snapshot = await serializeDocument(this.currentDocument, doc => cloneDeep(getSnapshot(doc))) - return { - revisionId: this.document.treeManagerAPI?.revisionId, - ...snapshot + const revisionId = this.document.treeManagerAPI?.revisionId + if (revisionId) { + return { + revisionId: this.document.treeManagerAPI?.revisionId, + ...snapshot + } } + + return snapshot } setCFM(cfm: CloudFileManager) { diff --git a/v3/src/models/history/tree-manager.ts b/v3/src/models/history/tree-manager.ts index 218860831..999257ed1 100644 --- a/v3/src/models/history/tree-manager.ts +++ b/v3/src/models/history/tree-manager.ts @@ -154,7 +154,6 @@ export const TreeManager = types self.document.history.push(entry) // Store the most recent history id. - console.log("RevisionId", entry.id) self.revisionId = entry.id // Add the entry to the undo stack if it is undoable.