Fix 'start chat' button on MemberInfo

this/self fail & related scoping

Fixes https://github.com/vector-im/vector-web/issues/1844
This commit is contained in:
David Baker 2016-07-22 17:30:25 +01:00
parent 46a2c74d71
commit b07e50d418

View file

@ -406,14 +406,14 @@ module.exports = React.createClass({
this.props.onFinished();
}
else {
self.setState({ updating: self.state.updating + 1 });
this.setState({ updating: this.state.updating + 1 });
createRoom({
createOpts: {
invite: [this.props.member.userId],
},
}).finally(function() {
self.props.onFinished();
self.setState({ updating: self.state.updating - 1 });
}).finally(() => {
this.props.onFinished();
this.setState({ updating: this.state.updating - 1 });
}).done();
}
},