Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

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

Alex Yang2cf4e8ebce64
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;