diff --git a/app/assets/javascripts/discourse/controllers/login_controller.js b/app/assets/javascripts/discourse/controllers/login_controller.js index de982a55d..4a2b8dab7 100644 --- a/app/assets/javascripts/discourse/controllers/login_controller.js +++ b/app/assets/javascripts/discourse/controllers/login_controller.js @@ -140,8 +140,8 @@ Discourse.LoginController = Discourse.Controller.extend(Discourse.ModalFunctiona } // Reload the page if we're authenticated if (options.authenticated) { - if (window.location.pathname === '/login') { - window.location.pathname = '/'; + if (window.location.pathname === Discourse.getURL('/login')) { + window.location.pathname = Discourse.getURL('/'); } else { window.location.reload(); }