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
window.location.pathname = "/" will not reload the page if there is a hash present. Using
window.location = "/" gives us the desired behavior.