diff --git a/frontend/sync-client/src/services/types/DocumentWithCursors.ts b/frontend/sync-client/src/services/types/DocumentWithCursors.ts index cbe56399..dae654c7 100644 --- a/frontend/sync-client/src/services/types/DocumentWithCursors.ts +++ b/frontend/sync-client/src/services/types/DocumentWithCursors.ts @@ -2,7 +2,7 @@ import type { CursorSpan } from "./CursorSpan"; export interface DocumentWithCursors { - vault_update_id: number; + vault_update_id: number | null; document_id: string; relative_path: string; cursors: CursorSpan[]; diff --git a/sync-server/src/app_state/websocket/models.rs b/sync-server/src/app_state/websocket/models.rs index ed61177c..7f1a3073 100644 --- a/sync-server/src/app_state/websocket/models.rs +++ b/sync-server/src/app_state/websocket/models.rs @@ -23,8 +23,9 @@ pub struct CursorPositionFromClient { #[derive(TS, Serialize, Deserialize, Clone, Debug)] pub struct DocumentWithCursors { - #[ts(as = "u32")] - pub vault_update_id: VaultUpdateId, + // It's None in case the document is dirty + #[ts(as = "Option")] + pub vault_update_id: Option, pub document_id: DocumentId, pub relative_path: String,