A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix(Comment): Block data submission when comment value is empty
haitao(lj)e670a6fbece5
diff --git a/ui/src/components/Comment/index.tsx b/ui/src/components/Comment/index.tsxindex 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,