diff --git a/src/lib/collaboration/crdt.ts b/src/lib/collaboration/crdt.ts index 71974a7..e27a3c5 100644 --- a/src/lib/collaboration/crdt.ts +++ b/src/lib/collaboration/crdt.ts @@ -27,16 +27,14 @@ export class CRDTManager { this.edgesMap = this.doc.getMap('edges') this.callbacks = callbacks - // Listen for remote Yjs document changes + // Schedule persistence on local Yjs document changes this.nodesMap.observe(() => { if (this.isApplyingRemote) return - this.notifyNodesChange() this.schedulePersist() }) this.edgesMap.observe(() => { if (this.isApplyingRemote) return - this.notifyEdgesChange() this.schedulePersist() })