FIX: Ensure page is reloaded correctly when a hash is present (#8096)

To demonstrate the issue:
- Visit https://meta.discourse.org/#somethingHere while logged in
- Click "log out"
- You will be logged out, but the page will not be reloaded

Setting `window.location.pathname = "/"` will not reload the page if there is a hash present. Using `window.location = "/"` gives us the desired behavior.
This commit is contained in:
David Taylor
2019-09-16 13:27:12 +01:00
committed by GitHub
parent e0a403edfc
commit 39f7e98b60
5 changed files with 6 additions and 6 deletions
@@ -63,7 +63,7 @@ Backup.reopenClass({
bootbox.alert(result.message);
} else {
// redirect to homepage (session might be lost)
window.location.pathname = Discourse.getURL("/");
window.location = Discourse.getURL("/");
}
});
}