mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-26 07:04:53 +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)!;
|
return destroyHandlerMap.get(doc)!;
|
||||||
}
|
}
|
||||||
const fn = async function handleDestroy() {
|
const fn = async function handleDestroy() {
|
||||||
const db = await dbPromise;
|
unTrackDoc(doc.guid, doc);
|
||||||
db.close();
|
|
||||||
};
|
};
|
||||||
destroyHandlerMap.set(doc, fn);
|
destroyHandlerMap.set(doc, fn);
|
||||||
return fn;
|
return fn;
|
||||||
|
Loading…
Reference in New Issue
Block a user