mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-25 20:12:13 +03:00
fix(y-indexeddb): un-track doc when destroy (#3358)
This commit is contained in:
parent
e6e98975ed
commit
2cf4e8ebce
@ -239,8 +239,7 @@ export const createIndexedDBProvider = (
|
||||
return destroyHandlerMap.get(doc)!;
|
||||
}
|
||||
const fn = async function handleDestroy() {
|
||||
const db = await dbPromise;
|
||||
db.close();
|
||||
unTrackDoc(doc.guid, doc);
|
||||
};
|
||||
destroyHandlerMap.set(doc, fn);
|
||||
return fn;
|
||||
|
Loading…
Reference in New Issue
Block a user