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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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