Redirect to '/' if OmniAuth login from '/login'

This commit is contained in:
Chris Hunt 2013-06-04 18:33:28 -07:00
parent 28aeb1d36c
commit 3774808a6e

View File

@ -139,7 +139,11 @@ Discourse.LoginController = Discourse.Controller.extend(Discourse.ModalFunctiona
}
// Reload the page if we're authenticated
if (options.authenticated) {
window.location.reload();
if (window.location.pathname === '/login') {
window.location.pathname = '/';
} else {
window.location.reload();
}
return;
}