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

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

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 {