From b437a2559dd62207272bda52221c46e7c4543230 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 27 Oct 2017 18:59:13 +0100 Subject: [PATCH] PR feedback --- src/Login.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Login.js b/src/Login.js index f1fb9a5b61..9039c9f511 100644 --- a/src/Login.js +++ b/src/Login.js @@ -158,7 +158,7 @@ export default class Login { deviceId: data.device_id, accessToken: data.access_token, }); - }, function(fallback_error) { + }).catch((fallback_error) => { // throw the original error throw originalError; }); @@ -172,13 +172,13 @@ export default class Login { }); return client.login('m.login.password', loginParamsLowercase).then(function(data) { return Promise.resolve({ - homeserverUrl: self._fallbackHsUrl, + homeserverUrl: self._hsUrl, identityServerUrl: self._isUrl, userId: data.user_id, deviceId: data.device_id, accessToken: data.access_token, }); - }, function(fallback_error) { + }).catch((fallback_error) => { // throw the original error throw originalError; });