Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/hello.js
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,19 @@ hello.utils.extend(hello.utils, {

// If this page is still open
if (p.page_uri) {
location.assign(p.page_uri);

// If we would redirect to the same page, just without the hash, don't do a full reload
if (window.location.href.replace(/#.*/, '') === p.page_uri) {
if ('replaceState' in window.history) {
window.history.replaceState('', document.title, window.location.pathname + window.location.search);
}
else {
window.location.hash = '';
}
}
else {
location.assign(p.page_uri);
}
}
}

Expand Down