ai fixes
This commit is contained in:
parent
7f62273e72
commit
bff3f5a5e9
8 changed files with 167 additions and 79 deletions
|
|
@ -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
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue