Skip to content

Commit

Permalink
fix: Fix bug in IE11 when this.node could be null when calling onDocu…
Browse files Browse the repository at this point in the history
…mentDrop (#517)

- Protect calling this.node.contains when this.node is null
- Fix IE11 bug where onDocumentDrop gets called with null this.node ref

Closes #492
  • Loading branch information
pcgilday authored and okonet committed Oct 19, 2017
1 parent 1fd768b commit 24c6ce5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Expand Up @@ -71,7 +71,7 @@ class Dropzone extends React.Component {
}

onDocumentDrop(evt) {
if (this.node.contains(evt.target)) {
if (this.node && this.node.contains(evt.target)) {
// if we intercepted an event for our instance, let it propagate down to the instance's onDrop handler
return
}
Expand Down

0 comments on commit 24c6ce5

Please sign in to comment.