Apply suggestion

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
wxiaoguang 2025-07-25 19:02:45 +08:00 committed by GitHub
parent 7f65e6fd2d
commit c6068328e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -545,10 +545,8 @@ function initIssueTemplateCommentEditors(commentForm: HTMLFormElement) {
queryElems(commentForm, '.combo-editor-dropzone .form-field-dropzone', (dropzoneContainer) => { queryElems(commentForm, '.combo-editor-dropzone .form-field-dropzone', (dropzoneContainer) => {
const dropzoneEl = dropzoneContainer.closest<HTMLElement>('.combo-editor-dropzone').querySelector<HTMLElement>('.dropzone'); const dropzoneEl = dropzoneContainer.closest<HTMLElement>('.combo-editor-dropzone').querySelector<HTMLElement>('.dropzone');
const dzInstance = dropzoneEl?.dropzone; const dzInstance = dropzoneEl?.dropzone;
const hasUploadedFiles = Boolean(dzInstance?.files.length);
if (dzInstance && dzInstance.files.length === 0) { toggleElem(dropzoneContainer, hasUploadedFiles);
hideElem(dropzoneContainer);
}
}); });
// activate this markdown editor // activate this markdown editor