Skip to content

Commit 3ac2767

Browse files
authored
fix: files is not array when drop a directory (#259)
1 parent 738324c commit 3ac2767

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/AjaxUploader.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ class AjaxUploader extends Component {
5959

6060
if (this.props.directory) {
6161
traverseFileTree(
62-
e.dataTransfer.items,
62+
Array.prototype.slice
63+
.call(e.dataTransfer.items),
6364
this.uploadFiles,
6465
_file => attrAccept(_file, this.props.accept)
6566
);

0 commit comments

Comments
 (0)