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 bug where no error message is showing when comment length exceeds max length when updating comment
zahash3bec091d7cce
diff --git a/ui/src/components/Comment/index.tsx b/ui/src/components/Comment/index.tsxindex 81345e7e..06ecfc26 100644--- a/ui/src/components/Comment/index.tsx+++ b/ui/src/components/Comment/index.tsx@@ -178,8 +178,13 @@ const Comment = ({ objectId, mode, commentId }) => {}).catch((err) => {if (err.isError) {- editCaptcha.handleCaptchaError(err.list);+ const captchaErr = editCaptcha.handleCaptchaError(err.list);+ // If it is not a CAPTCHA error, leave it to the subsequent error handling logic to continue processing.+ if (!(captchaErr && err.list.length === 1)) {+ return Promise.reject(err);+ }}+ return Promise.resolve();});});}