web/admin: use history.replaceState in Tabs to prevent double history entries

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-05-04 18:13:20 +02:00
parent 8a666535a8
commit a335ca0895
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ export class Tabs extends LitElement {
this.currentPage = slot; this.currentPage = slot;
const currentUrl = window.location.hash.slice(1, Infinity).split(ROUTE_SEPARATOR)[0]; const currentUrl = window.location.hash.slice(1, Infinity).split(ROUTE_SEPARATOR)[0];
const newUrl = `#${currentUrl};${slot}`; const newUrl = `#${currentUrl};${slot}`;
window.location.hash = newUrl; history.replaceState(undefined, "", newUrl);
} }
renderTab(page: Element): TemplateResult { renderTab(page: Element): TemplateResult {