From d4d81515d297b157545bf92cd310c8e9d4a6f053 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Wed, 17 Jul 2019 12:03:45 +0530 Subject: [PATCH] Fix the build. --- .../controllers/preferences/account.js.es6 | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 b/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 index 64b8262f211..2c4a2d1b1ea 100644 --- a/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 +++ b/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 @@ -228,17 +228,18 @@ export default Ember.Controller.extend( type: "POST", data: token ? { token_id: token.id } : {} } - ).then(() => { - if (!token) { - const redirect = this.siteSettings.logout_redirect; - if (Ember.isEmpty(redirect)) { - window.location.pathname = Discourse.getURL("/"); - } else { - window.location.href = redirect; + ) + .then(() => { + if (!token) { + const redirect = this.siteSettings.logout_redirect; + if (Ember.isEmpty(redirect)) { + window.location.pathname = Discourse.getURL("/"); + } else { + window.location.href = redirect; + } } - } - }) - .catch(popupAjaxError); + }) + .catch(popupAjaxError); }, showToken(token) {