File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -543,9 +543,9 @@ function initIssueTemplateCommentEditors(commentForm: HTMLFormElement) {
543543      showElem ( commentForm . querySelectorAll ( '.combo-editor-dropzone .form-field-real' ) ) ; 
544544      hideElem ( commentForm . querySelectorAll ( '.combo-editor-dropzone .combo-markdown-editor' ) ) ; 
545545      queryElems ( commentForm ,  '.combo-editor-dropzone .form-field-dropzone' ,  ( dropzoneContainer )  =>  { 
546-         const   dropzoneEl   =   dropzoneContainer . closest < HTMLElement > ( '.combo-editor -dropzone' ) . querySelector < HTMLElement > ( '. dropzone' ) ; 
547-         const  dzInstance  =  dropzoneEl ? .dropzone ; 
548-         const  hasUploadedFiles  =  Boolean ( dzInstance ? .files . length ) ; 
546+         // if "form-field -dropzone" exists, then " dropzone" must also exist 
547+         const  dropzone  =  dropzoneContainer . querySelector ( '.dropzone' ) . dropzone ; 
548+         const  hasUploadedFiles  =  dropzone . files . length   !==   0 ; 
549549        toggleElem ( dropzoneContainer ,  hasUploadedFiles ) ; 
550550      } ) ; 
551551
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments