X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/f63f3a5360ae6381d4b332bf86ef52b4e22107fb..8623f430ea556381f8681c2aea00e43e64d3f6d1:/src/views-components/file-uploader/file-uploader.tsx?ds=sidebyside

diff --git a/src/views-components/file-uploader/file-uploader.tsx b/src/views-components/file-uploader/file-uploader.tsx
index d9111f47..e71a14c5 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);
+        }
     },
 });
 
