From c2a5cc7af21117c7b8d6391465fdd4fe51ae65f3 Mon Sep 17 00:00:00 2001 From: Coloey <487336863@qq.com> Date: Mon, 17 Oct 2022 21:53:50 +0800 Subject: [PATCH] fix:complete the function of 'accept' option --- src/AjaxUploader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AjaxUploader.tsx b/src/AjaxUploader.tsx index caa7b7d1..6f3dca4d 100644 --- a/src/AjaxUploader.tsx +++ b/src/AjaxUploader.tsx @@ -35,7 +35,7 @@ class AjaxUploader extends Component { const { accept, directory } = this.props; const { files } = e.target; const acceptedFiles = [...files].filter( - (file: RcFile) => !directory || attrAccept(file, accept), + (file: RcFile) => !directory && attrAccept(file, accept), ); this.uploadFiles(acceptedFiles); this.reset();