This is an automated email from the ASF dual-hosted git repository.

shuai pushed a commit to branch feat/1.2.1/ui
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git

commit 81ad54c4c87dc5896557d640894d0dad5c12f2fb
Author: shuai <[email protected]>
AuthorDate: Fri Nov 24 14:47:39 2023 +0800

    fix: the editor clicks the img button for the first time and it does not 
take effect
---
 ui/src/components/Editor/ToolBars/image.tsx | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/ui/src/components/Editor/ToolBars/image.tsx 
b/ui/src/components/Editor/ToolBars/image.tsx
index a38e56fe..1cfe1d9b 100644
--- a/ui/src/components/Editor/ToolBars/image.tsx
+++ b/ui/src/components/Editor/ToolBars/image.tsx
@@ -218,9 +218,6 @@ const Image = () => {
   const addLink = (ctx) => {
     context = ctx;
     setEditor(context.editor);
-    if (!editor) {
-      return;
-    }
     const text = context.editor?.getSelection();
 
     setImageName({ ...imageName, value: text });

Reply via email to