yjs / y-indexeddb

IndexedDB database adapter for Yjs
https://docs.yjs.dev/ecosystem/database-provider/y-indexeddb
Other
196 stars 30 forks source link

fix: async call from fetchUpdates would cause duplicate store data #27

Closed himself65 closed 1 year ago

himself65 commented 1 year ago

Fixes: https://github.com/yjs/y-indexeddb/issues/25

dmonad commented 1 year ago

You could argue that a destroyed y-indexeddb provider shouldn't apply updates to a Yjs document. So I "fixed" that. I'm not sure if that is a step back. I implemented this here: https://github.com/yjs/y-indexeddb/commit/9a9112bd410bbfef9e6f1bbfc1c2357d889f09ad

I still believe that you shouldn't create several y-indexeddb instances. That's just unnecessary work.