mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 11:41:32 +01:00 
			
		
		
		
	Fix JS error when dropping a file to a editor without dropzone (#32804)
`dropzoneEl` may not exist
This commit is contained in:
		
							parent
							
								
									dfd7594499
								
							
						
					
					
						commit
						1e751d81b3
					
				| @ -178,6 +178,7 @@ export function initTextareaEvents(textarea, dropzoneEl) { | ||||
|   }); | ||||
|   textarea.addEventListener('drop', (e) => { | ||||
|     if (!e.dataTransfer.files.length) return; | ||||
|     if (!dropzoneEl) return; | ||||
|     handleUploadFiles(new TextareaEditor(textarea), dropzoneEl, e.dataTransfer.files, e); | ||||
|   }); | ||||
|   dropzoneEl?.dropzone.on(DropzoneCustomEventRemovedFile, ({fileUuid}) => { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user