Explain why binding
This commit is contained in:
parent
13dfe9ef0f
commit
8f42134d9f
1 changed files with 2 additions and 0 deletions
|
@ -461,6 +461,8 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
let reject = <Spinner />;
|
let reject = <Spinner />;
|
||||||
if (!this.state.rejectingInvites) {
|
if (!this.state.rejectingInvites) {
|
||||||
|
// bind() the invited rooms so any new invites that may come in as this button is clicked
|
||||||
|
// don't inadvertently get rejected as well.
|
||||||
reject = (
|
reject = (
|
||||||
<button className="mx_UserSettings_button danger"
|
<button className="mx_UserSettings_button danger"
|
||||||
onClick={this._onRejectAllInvitesClicked.bind(this, invitedRooms)}>
|
onClick={this._onRejectAllInvitesClicked.bind(this, invitedRooms)}>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue