From aeb1b1688da79c8bb31f43430a30647a4419a8c1 Mon Sep 17 00:00:00 2001 From: MingLiang Wang Date: Tue, 10 Jan 2023 14:56:53 +0800 Subject: [PATCH] fix: fix avatar id --- packages/data-center/src/provider/utils.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/data-center/src/provider/utils.ts b/packages/data-center/src/provider/utils.ts index b0a08b92d7..d8e5f6d058 100644 --- a/packages/data-center/src/provider/utils.ts +++ b/packages/data-center/src/provider/utils.ts @@ -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); }