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(); this.props.onFinished();
} }
else { else {
self.setState({ updating: self.state.updating + 1 }); this.setState({ updating: this.state.updating + 1 });
createRoom({ createRoom({
createOpts: { createOpts: {
invite: [this.props.member.userId], invite: [this.props.member.userId],
}, },
}).finally(function() { }).finally(() => {
self.props.onFinished(); this.props.onFinished();
self.setState({ updating: self.state.updating - 1 }); this.setState({ updating: this.state.updating - 1 });
}).done(); }).done();
} }
}, },