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

This commit is contained in:
EYHN
2025-02-20 04:24:49 +00:00
parent 1d339c682b
commit 5042d9f644
2 changed files with 23 additions and 9 deletions

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, {