This commit is contained in:
Andras Schmelczer 2026-04-25 19:13:26 +01:00
parent 7f62273e72
commit bff3f5a5e9
8 changed files with 167 additions and 79 deletions

View file

@ -141,13 +141,9 @@ export class SyncEventQueue {
}
if (input.type === SyncEventType.LocalDelete) {
const deleteId = pendingDocumentId ?? documentId;
if (deleteId === undefined) {
throw new Error("Unreachable: deleteId must be defined here");
}
this.events.push({
type: SyncEventType.LocalDelete,
documentId: deleteId
documentId: (pendingDocumentId ?? documentId)!
});
return;
}
@ -174,16 +170,11 @@ export class SyncEventQueue {
}
await this.save();
}
return;
}
const updateId = pendingDocumentId ?? documentId;
if (updateId === undefined) {
throw new Error("Unreachable: updateId must be defined here");
}
this.events.push({
type: SyncEventType.LocalUpdate,
documentId: updateId,
documentId: (pendingDocumentId ?? documentId)!,
path,
originalPath: path
});