mirror of
https://github.com/Floriansylvain/portfolio.git
synced 2026-08-19 19:53:18 +02:00
🚑️ addState -> replaceState
This commit is contained in:
@@ -66,8 +66,7 @@ function updateUrl() {
|
|||||||
|
|
||||||
if (elements[index] && !window.location.href.includes(elements[index].id)) {
|
if (elements[index] && !window.location.href.includes(elements[index].id)) {
|
||||||
const hash = 'index.html#' + elements[index].id;
|
const hash = 'index.html#' + elements[index].id;
|
||||||
console.log("pouet");
|
window.history.replaceState(null, null, hash);
|
||||||
window.history.pushState(null, null, hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user