diff --git a/src/upload/hooks/useDrag.ts b/src/upload/hooks/useDrag.ts index da06387955..69806367e6 100644 --- a/src/upload/hooks/useDrag.ts +++ b/src/upload/hooks/useDrag.ts @@ -19,10 +19,10 @@ export default function useDrag(props: UploadDragEvents, accept: Ref) { const { files } = event.dataTransfer; const dragFiles: File[] = getFileList(files, accept.value); - if (!dragFiles.length) return; - - props.onDragFileChange?.(dragFiles); props.onDrop?.({ e: event }); + if (dragFiles?.length) { + props.onDragFileChange?.(dragFiles); + } }; const handleDragenter = (event: DragEvent) => {