fix(y-indexeddb): un-track doc when destroy (#3358)

This commit is contained in:
Alex Yang
2023-07-24 08:23:16 -07:00
committed by GitHub
parent e6e98975ed
commit 2cf4e8ebce

View File

@@ -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;