diff --git a/lib/Client/InternalClient.js b/lib/Client/InternalClient.js index a0726627e..45194cdc1 100644 --- a/lib/Client/InternalClient.js +++ b/lib/Client/InternalClient.js @@ -451,7 +451,7 @@ var InternalClient = (function () { _this9.client.emit("debug", "direct API login, cached token was unavailable"); var token = res.token; _this9.tokenCacher.setToken(email, password, token); - loginWithToken(token, email, password); + return _this9.loginWithToken(token, email, password); }, function (error) { _this9.websocket = null; throw error; diff --git a/src/Client/InternalClient.js b/src/Client/InternalClient.js index b8d858828..83410dad0 100644 --- a/src/Client/InternalClient.js +++ b/src/Client/InternalClient.js @@ -349,7 +349,7 @@ export default class InternalClient { this.client.emit("debug", "direct API login, cached token was unavailable"); var token = res.token; this.tokenCacher.setToken(email, password, token); - loginWithToken(token, email, password); + return this.loginWithToken(token, email, password); }, error => { this.websocket = null; throw error;