Skip to content

Commit

Permalink
fix not first applying state from yjs document
Browse files Browse the repository at this point in the history
  • Loading branch information
vieiralucas committed Nov 29, 2024
1 parent 0c56cb6 commit 78fac40
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apps/api/src/yjs/v2/persistors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export class DocumentPersistor implements Persistor {
select: { update: true },
orderBy: { createdAt: 'desc' },
})
this.applyUpdate(ydoc, dbDoc.state)
if (update) {
this.applyUpdate(ydoc, update.update)
}
Expand Down

0 comments on commit 78fac40

Please sign in to comment.