Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix this.getInitialState is not a function err in DropZone component #7365

Merged
merged 2 commits into from
Aug 9, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions client/components/drop-zone/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ export class DropZone extends Component {
return;
}

this.setState( this.getInitialState() );
this.setState( {
isDraggingOverDocument: false,
isDraggingOverElement: false
} );
}

toggleMutationObserver() {
Expand Down Expand Up @@ -159,10 +162,7 @@ export class DropZone extends Component {
// where files dragged directly from the dock are not recognized
event.dataTransfer && event.dataTransfer.files.length;

this.setState( {
isDraggingOverDocument: false,
isDraggingOverElement: false
} );
this.resetDragState();

if ( ! this.props.fullScreen && ! ReactDom.findDOMNode( this.refs.zone ).contains( event.target ) ) {
return;
Expand Down