aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/client/sync/crdt/document-manager.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/sync/crdt/document-manager.ts')
-rw-r--r--src/client/sync/crdt/document-manager.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/sync/crdt/document-manager.ts b/src/client/sync/crdt/document-manager.ts
index b753d88..ab121ec 100644
--- a/src/client/sync/crdt/document-manager.ts
+++ b/src/client/sync/crdt/document-manager.ts
@@ -187,6 +187,7 @@ function getEmptyDocumentData(
userId: "",
name: "",
description: null,
+ defaultNoteTypeId: null,
createdAt: 0,
deletedAt: null,
},
@@ -300,6 +301,7 @@ export function deckToCrdtDocument(deck: LocalDeck): CrdtDeckDocument {
userId: deck.userId,
name: deck.name,
description: deck.description,
+ defaultNoteTypeId: deck.defaultNoteTypeId,
createdAt: deck.createdAt.getTime(),
deletedAt: deck.deletedAt?.getTime() ?? null,
},
@@ -317,6 +319,7 @@ export function crdtDocumentToDeck(
userId: doc.data.userId,
name: doc.data.name,
description: doc.data.description,
+ defaultNoteTypeId: doc.data.defaultNoteTypeId ?? null,
createdAt: new Date(doc.data.createdAt),
updatedAt: new Date(doc.meta.lastModified),
deletedAt: doc.data.deletedAt ? new Date(doc.data.deletedAt) : null,