From d8494ff89b2abd791fc360909239a7db8cce54b7 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Mon, 20 Jul 2015 13:48:40 +0100 Subject: [PATCH] Fix syntax --- src/MatrixClientPeg.js | 6 +++--- src/controllers/templates/Login.js | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/MatrixClientPeg.js b/src/MatrixClientPeg.js index 87e6af08ce..6b36e67e6b 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -40,7 +40,7 @@ if (localStorage) { var access_token = localStorage.getItem("mx_access_token"); var user_id = localStorage.getItem("mx_user_id"); if (access_token && user_id && hs_url) { - matrixClient = createClient(hs_url, is_url, user_id, access_token); + createClient(hs_url, is_url, user_id, access_token); } } @@ -54,10 +54,10 @@ module.exports = { baseUrl: hs_url, idBaseUrl: is_url }); - } + }, replaceUsingAccessToken: function(hs_url, is_url, user_id, access_token) { - matrixClient = createClient(hs_url, is_url, user_id, access_token); + createClient(hs_url, is_url, user_id, access_token); if (localStorage) { try { localStorage.clear(); diff --git a/src/controllers/templates/Login.js b/src/controllers/templates/Login.js index 135b64337d..1cfec18d0f 100644 --- a/src/controllers/templates/Login.js +++ b/src/controllers/templates/Login.js @@ -76,10 +76,9 @@ module.exports = { 'password': formVals.password }).done(function(data) { MatrixClientPeg.replaceUsingAccessToken( - this.state.hs_url, this.state.is_url, + that.state.hs_url, that.state.is_url, data.user_id, data.access_token ); - })); if (that.props.onLoggedIn) { that.props.onLoggedIn(); }