Explain why binding
parent
13dfe9ef0f
commit
8f42134d9f
|
@ -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…
Reference in New Issue