feat(y-indexeddb): remove id (#2810)

This commit is contained in:
Alex Yang authored and GitHub committed 2023-06-17 13:58:48 +08:00
1 parent deeafb3a12
commit c68220166a
6 files changed
+68 -68

No files matched your search

+2 -2
View File
@@ -128,7 +128,7 @@ export async function tryMigrate(
}
export async function downloadBinary(
id: string,
guid: string,
dbName = DEFAULT_DB_NAME
): Promise<UpdateMessage['update'] | false> {
const dbPromise = openDB<BlockSuiteBinaryDB>(dbName, dbVersion, {
@@ -136,7 +136,7 @@ export async function downloadBinary(
});
const db = await dbPromise;
const t = db.transaction('workspace', 'readonly').objectStore('workspace');
const doc = await t.get(id);
const doc = await t.get(guid);
if (!doc) {
return false;
} else {