From fe064ccebc330c4e9df62f36788d030718b97511 Mon Sep 17 00:00:00 2001 From: VipinDevelops Date: Tue, 4 Mar 2025 20:11:15 +0530 Subject: [PATCH] use directly --- .../issue-detail/issue-activity/comments/comment-create.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/web/core/components/issues/issue-detail/issue-activity/comments/comment-create.tsx b/web/core/components/issues/issue-detail/issue-activity/comments/comment-create.tsx index 35a7985cc7..6cd9b61430 100644 --- a/web/core/components/issues/issue-detail/issue-activity/comments/comment-create.tsx +++ b/web/core/components/issues/issue-detail/issue-activity/comments/comment-create.tsx @@ -18,7 +18,6 @@ const fileService = new FileService(); // editor import { TActivityOperations } from "../root"; - type TIssueCommentCreate = { projectId: string; workspaceSlug: string; @@ -82,7 +81,6 @@ export const IssueCommentCreate: FC = (props) => { const commentHTML = watch("comment_html"); const isEmpty = isCommentEmpty(commentHTML); - const isEditorReadyToDiscard = editorRef.current?.isEditorReadyToDiscard() return (
= (props) => { "-bottom-5": !peekIssue, })} onKeyDown={(e) => { - if (e.key === "Enter" && !e.shiftKey && !e.ctrlKey && !e.metaKey && !isEmpty && isEditorReadyToDiscard) + if (e.key === "Enter" && !e.shiftKey && !e.ctrlKey && !e.metaKey && !isEmpty && editorRef.current?.isEditorReadyToDiscard()) handleSubmit(onSubmit)(e); }} >