Skip to content
Snippets Groups Projects
Unverified Commit 1c81f7e3 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Don't push /root on the browser history

parent 558e5184
No related branches found
No related tags found
No related merge requests found
Pipeline #47138 passed
......@@ -44,7 +44,9 @@ export class Router {
// In case of a router redirect, set the new location
if (newPathname !== oldPathName) {
const referrerUrl = location.href;
window.history.replaceState({}, '', newPathname);
if (!newPathname.endsWith('/root')) {
window.history.replaceState({}, '', newPathname);
}
this.dispatchLocationChanged(referrerUrl);
}
this.setState(page);
......@@ -66,7 +68,9 @@ export class Router {
if (newPathname === oldPathname)
return;
const referrerUrl = location.href;
window.history.pushState({}, '', newPathname);
if (!newPathname.endsWith('/root')) {
window.history.pushState({}, '', newPathname);
}
this.dispatchLocationChanged(referrerUrl);
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment