diff --git a/packages/y-indexeddb/src/index.ts b/packages/y-indexeddb/src/index.ts index b1bb4022ff..d96d857bcc 100644 --- a/packages/y-indexeddb/src/index.ts +++ b/packages/y-indexeddb/src/index.ts @@ -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;