Fix the build.

This commit is contained in:
Arpit Jalan 2019-07-17 12:03:45 +05:30
parent e4d743910d
commit d4d81515d2
1 changed files with 11 additions and 10 deletions

View File

@ -228,17 +228,18 @@ export default Ember.Controller.extend(
type: "POST", type: "POST",
data: token ? { token_id: token.id } : {} data: token ? { token_id: token.id } : {}
} }
).then(() => { )
if (!token) { .then(() => {
const redirect = this.siteSettings.logout_redirect; if (!token) {
if (Ember.isEmpty(redirect)) { const redirect = this.siteSettings.logout_redirect;
window.location.pathname = Discourse.getURL("/"); if (Ember.isEmpty(redirect)) {
} else { window.location.pathname = Discourse.getURL("/");
window.location.href = redirect; } else {
window.location.href = redirect;
}
} }
} })
}) .catch(popupAjaxError);
.catch(popupAjaxError);
}, },
showToken(token) { showToken(token) {