mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 12:36:24 +08:00
fix(y-indexeddb): un-track doc when destroy (#3358)
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user