diff --git a/packages/common/nbstore/src/sync/doc/peer.ts b/packages/common/nbstore/src/sync/doc/peer.ts index 5caa4bd918..a12f5ddd71 100644 --- a/packages/common/nbstore/src/sync/doc/peer.ts +++ b/packages/common/nbstore/src/sync/doc/peer.ts @@ -246,7 +246,8 @@ export class DocSyncPeer { if ( !this.remote.isReadonly && clock && - (pushedClock === null || pushedClock !== clock.timestamp) + (pushedClock === null || + pushedClock.getTime() !== clock.timestamp.getTime()) ) { await this.jobs.pullAndPush(docId, signal); } else { @@ -254,7 +255,10 @@ export class DocSyncPeer { const pulled = (await this.syncMetadata.getPeerPulledRemoteClock(this.peerId, docId)) ?.timestamp ?? null; - if (pulled === null || pulled !== this.status.remoteClocks.get(docId)) { + if ( + pulled === null || + pulled.getTime() !== this.status.remoteClocks.get(docId)?.getTime() + ) { await this.jobs.pull(docId, signal); } }