Return the promise so the failure actually propagates through the promise chain. Makes the invite error handling code work.
Fixes https://github.com/vector-im/vector-web/issues/691
This commit is contained in:
parent
f41c0d9bbf
commit
a74e7b45d0
1 changed files with 2 additions and 2 deletions
|
@ -202,12 +202,12 @@ module.exports = React.createClass({
|
||||||
var promise = inviteWarningDefer.promise;
|
var promise = inviteWarningDefer.promise;
|
||||||
if (isEmailAddress) {
|
if (isEmailAddress) {
|
||||||
promise = promise.then(function() {
|
promise = promise.then(function() {
|
||||||
MatrixClientPeg.get().inviteByEmail(self.props.roomId, inputText);
|
return MatrixClientPeg.get().inviteByEmail(self.props.roomId, inputText);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
promise = promise.then(function() {
|
promise = promise.then(function() {
|
||||||
MatrixClientPeg.get().invite(self.props.roomId, inputText);
|
return MatrixClientPeg.get().invite(self.props.roomId, inputText);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue