From c8790d20dab364e5fcd12ea5a3d087916fa81982 Mon Sep 17 00:00:00 2001 From: Flrande <1978616327@qq.com> Date: Wed, 5 Feb 2025 09:29:24 +0000 Subject: [PATCH] fix(editor): can not add attachment because service not exist (#9952) ![image](https://github.com/user-attachments/assets/0d78058a-4e30-4133-8c63-238456e70f34) --- blocksuite/affine/block-attachment/src/utils.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/blocksuite/affine/block-attachment/src/utils.ts b/blocksuite/affine/block-attachment/src/utils.ts index 593d39a7be..cba8ac8ba2 100644 --- a/blocksuite/affine/block-attachment/src/utils.ts +++ b/blocksuite/affine/block-attachment/src/utils.ts @@ -268,13 +268,7 @@ export async function addAttachments( ): Promise { if (!files.length) return []; - const attachmentService = std.getService('affine:attachment'); const gfx = std.get(GfxControllerIdentifier); - - if (!attachmentService) { - console.error('Attachment service not found'); - return []; - } const maxFileSize = std.store.get(FileSizeLimitService).maxFileSize; const isSizeExceeded = files.some(file => file.size > maxFileSize); if (isSizeExceeded) {