From e670a6fbece5be5600a087cce9353f96c236196d Mon Sep 17 00:00:00 2001 From: "haitao(lj)" Date: Fri, 6 Jan 2023 18:44:29 +0800 Subject: [PATCH] fix(Comment): Block data submission when comment value is empty --- ui/src/components/Comment/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/src/components/Comment/index.tsx b/ui/src/components/Comment/index.tsx index 1c3191aa..24abb22e 100644 --- a/ui/src/components/Comment/index.tsx +++ b/ui/src/components/Comment/index.tsx @@ -100,6 +100,9 @@ const Comment = ({ objectId, mode, commentId }) => { const users = matchedUsers(item.value); const userNames = unionBy(users.map((user) => user.userName)); const html = marked.parse(parseUserInfo(item.value)); + if (!item.value || !html) { + return; + } const params = { object_id: objectId, original_text: item.value,