Skip to content

Commit 185f2b0

Browse files
Matthew Reishusclaydiffrient
Matthew Reishus
authored andcommitted
Remove .bind(this) from removePortal call
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
1 parent d8e6e84 commit 185f2b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/components/Modal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ var Modal = React.createClass({
9494
this.portal.closeWithTimeout();
9595
}
9696

97-
setTimeout(this.removePortal.bind(this), closesAt - now);
97+
setTimeout(function() { this.removePortal(); }, closesAt - now);
9898
} else {
9999
this.removePortal();
100100
}

0 commit comments

Comments
 (0)