fix: fix avatar id

This commit is contained in:
MingLiang Wang 2023-01-10 14:56:53 +08:00
parent 8c1636f1a2
commit aeb1b1688d

View File

@ -8,8 +8,7 @@ export const setDefaultAvatar = async (
const blob = await getDefaultHeadImgBlob(blocksuiteWorkspace.meta.name);
const blobStorage = await blocksuiteWorkspace.blobs;
assert(blobStorage, 'No blob storage');
const blobId = await blobStorage.set(blob);
const avatar = await blobStorage.get(blobId);
const avatar = await blobStorage.set(blob);
if (avatar) {
blocksuiteWorkspace.meta.setAvatar(avatar);
}