fix(nbstore): check before save empty update (#10304)

This commit is contained in:
EYHN committed 2025-02-20 04:24:50 +00:00
1 parent 1d339c682b
commit 5042d9f644
2 files changed
+23 -9

No files matched your search

+9 -7
View File
@@ -437,13 +437,15 @@ export class DocSyncPeer {
data.length > 0 ? await this.mergeUpdates(data) : new Uint8Array();
throwIfAborted(signal);
await this.local.pushDocUpdate(
{
docId,
bin: update,
},
this.uniqueId
);
if (!isEmptyUpdate(update)) {
await this.local.pushDocUpdate(
{
docId,
bin: update,
},
this.uniqueId
);
}
throwIfAborted(signal);
await this.syncMetadata.setPeerPulledRemoteClock(this.peerId, {