Skip to content

Commit c606832

Browse files
authored
Apply suggestion
Signed-off-by: wxiaoguang <[email protected]>
1 parent 7f65e6f commit c606832

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

web_src/js/features/repo-issue.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -545,10 +545,8 @@ function initIssueTemplateCommentEditors(commentForm: HTMLFormElement) {
545545
queryElems(commentForm, '.combo-editor-dropzone .form-field-dropzone', (dropzoneContainer) => {
546546
const dropzoneEl = dropzoneContainer.closest<HTMLElement>('.combo-editor-dropzone').querySelector<HTMLElement>('.dropzone');
547547
const dzInstance = dropzoneEl?.dropzone;
548-
549-
if (dzInstance && dzInstance.files.length === 0) {
550-
hideElem(dropzoneContainer);
551-
}
548+
const hasUploadedFiles = Boolean(dzInstance?.files.length);
549+
toggleElem(dropzoneContainer, hasUploadedFiles);
552550
});
553551

554552
// activate this markdown editor

0 commit comments

Comments
 (0)