X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/fb1ecf2421f8aac07d733d3bb56bb39312274f8c..e039a6f51ca398dae75a76cf2817b3f91bc0c1a6:/src/views-components/file-uploader/file-uploader.tsx

diff --git a/src/views-components/file-uploader/file-uploader.tsx b/src/views-components/file-uploader/file-uploader.tsx
index d9111f47d9..e71a14c5c8 100644
--- a/src/views-components/file-uploader/file-uploader.tsx
+++ b/src/views-components/file-uploader/file-uploader.tsx
@@ -21,8 +21,10 @@ const mapStateToProps = (state: RootState, { disabled }: FileUploaderProps): Pic
 
 const mapDispatchToProps = (dispatch: Dispatch, { onDrop }: FileUploaderProps): Pick<FileUploadProps, 'onDrop'> => ({
     onDrop: files => {
-        dispatch(fileUploaderActions.SET_UPLOAD_FILES(files));
-        onDrop(files);
+        if (files.length > 0) {
+            dispatch(fileUploaderActions.SET_UPLOAD_FILES(files));
+            onDrop(files);
+        }
     },
 });
 
