Handle "comment form combo editor init" more gracefully (#26688)

Now Gitea exposes unhandled promise rejection messages as error message on the UI.

The "comment form" was quite unclear before, so it should be handled more gracefully to avoid such error.
mj-develop
wxiaoguang 9 months ago committed by GitHub
parent 083b0b4770
commit f67f57a4c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -54,9 +54,10 @@ export function initRepoCommentForm() {
}
if ($commentForm.find('.field.combo-editor-dropzone').length) {
// at the moment, if a form has multiple combo-markdown-editors, it must be a issue template form
// at the moment, if a form has multiple combo-markdown-editors, it must be an issue template form
initIssueTemplateCommentEditors($commentForm);
} else {
} else if ($commentForm.find('.combo-markdown-editor').length) {
// it's quite unclear about the "comment form" elements, sometimes it's for issue comment, sometimes it's for file editor/uploader message
initSingleCommentEditor($commentForm);
}

Loading…
Cancel
Save