Skip to content

Commit

Permalink
Remove .bind(this) from removePortal call
Browse files Browse the repository at this point in the history
This fixes this warning from react in the console without breaking functionality:

Warning: bind(): You are binding a component method to the component. React does this for you automatically in a high-performance way, so you can safely remove this call. See Modal
  • Loading branch information
Matthew Reishus authored and claydiffrient committed Mar 9, 2017
1 parent d8e6e84 commit 185f2b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ var Modal = React.createClass({
this.portal.closeWithTimeout();
}

setTimeout(this.removePortal.bind(this), closesAt - now);
setTimeout(function() { this.removePortal(); }, closesAt - now);
} else {
this.removePortal();
}
Expand Down

0 comments on commit 185f2b0

Please sign in to comment.