Skip to content

Commit

Permalink
fix: if drop event does not contain files, do not trigger file handling
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed Dec 28, 2018
1 parent 86f74bd commit e1318b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Files.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ class Files extends React.Component<Props> {
}

processSelectedFiles = async (eventFiles: Array<File>) => {
if (eventFiles.length === 0) {
return;
}

const { convertToBase64, onSuccess, onError } = this.props;
const { browseFilesPassedParams } = this;
const callbacks = {
Expand Down

0 comments on commit e1318b5

Please sign in to comment.