From a74e7b45d064f704e0980394c289cfdd4e92ca7e Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 9 Mar 2016 18:48:38 +0000 Subject: [PATCH] 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 --- src/components/views/rooms/MemberList.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/rooms/MemberList.js b/src/components/views/rooms/MemberList.js index 83e7a0504b..175161e1c9 100644 --- a/src/components/views/rooms/MemberList.js +++ b/src/components/views/rooms/MemberList.js @@ -202,12 +202,12 @@ module.exports = React.createClass({ var promise = inviteWarningDefer.promise; if (isEmailAddress) { promise = promise.then(function() { - MatrixClientPeg.get().inviteByEmail(self.props.roomId, inputText); + return MatrixClientPeg.get().inviteByEmail(self.props.roomId, inputText); }); } else { promise = promise.then(function() { - MatrixClientPeg.get().invite(self.props.roomId, inputText); + return MatrixClientPeg.get().invite(self.props.roomId, inputText); }); }