s/.done(/.then(/ since modern es6 track unhandled promise exceptions
This commit is contained in:
@@ -105,7 +105,7 @@ module.exports = createReactClass({
|
||||
phase: PHASE_SENDING_EMAIL,
|
||||
});
|
||||
this.reset = new PasswordReset(this.props.serverConfig.hsUrl, this.props.serverConfig.isUrl);
|
||||
this.reset.resetPassword(email, password).done(() => {
|
||||
this.reset.resetPassword(email, password).then(() => {
|
||||
this.setState({
|
||||
phase: PHASE_EMAIL_SENT,
|
||||
});
|
||||
|
||||
@@ -253,7 +253,7 @@ module.exports = createReactClass({
|
||||
this.setState({
|
||||
busy: false,
|
||||
});
|
||||
}).done();
|
||||
}).then();
|
||||
},
|
||||
|
||||
onUsernameChanged: function(username) {
|
||||
@@ -424,7 +424,7 @@ module.exports = createReactClass({
|
||||
this.setState({
|
||||
busy: false,
|
||||
});
|
||||
}).done();
|
||||
}).then();
|
||||
},
|
||||
|
||||
_isSupportedFlow: function(flow) {
|
||||
|
||||
@@ -43,7 +43,7 @@ module.exports = createReactClass({
|
||||
const cli = MatrixClientPeg.get();
|
||||
this.setState({busy: true});
|
||||
const self = this;
|
||||
cli.getProfileInfo(cli.credentials.userId).done(function(result) {
|
||||
cli.getProfileInfo(cli.credentials.userId).then(function(result) {
|
||||
self.setState({
|
||||
avatarUrl: MatrixClientPeg.get().mxcUrlToHttp(result.avatar_url),
|
||||
busy: false,
|
||||
|
||||
@@ -371,7 +371,7 @@ module.exports = createReactClass({
|
||||
if (pushers[i].kind === 'email') {
|
||||
const emailPusher = pushers[i];
|
||||
emailPusher.data = { brand: this.props.brand };
|
||||
matrixClient.setPusher(emailPusher).done(() => {
|
||||
matrixClient.setPusher(emailPusher).then(() => {
|
||||
console.log("Set email branding to " + this.props.brand);
|
||||
}, (error) => {
|
||||
console.error("Couldn't set email branding: " + error);
|
||||
|
||||
Reference in New Issue
Block a user