Skip to content

Commit

Permalink
fixed missing DragEvent on Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
lionng429 committed Mar 21, 2018
1 parent f96fdda commit 1fc5dba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Receiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class Receiver extends Component {

componentDidMount() {
invariant(
!!window.DragEvent && !!window.DataTransfer,
'Upload end point must be provided to upload files'
(!!window.DragEvent || !!window.Event) && !!window.DataTransfer,
'Browser does not support DnD events or File API.'
);

this.wrapper.addEventListener('dragenter', this.onDragEnter);
Expand Down

0 comments on commit 1fc5dba

Please sign in to comment.