Refactoring: properly handle the hash

This commit is contained in:
Pieter Vander Vennet 2023-06-07 02:42:49 +02:00
parent d6d9438bc7
commit 1ec76b66b5
8 changed files with 230 additions and 89 deletions

View file

@ -47,14 +47,6 @@ export default class Hash {
hash.setData(newValue)
}
window.addEventListener("popstate", (_) => {
let newValue = window.location.hash.substr(1)
if (newValue === "") {
newValue = undefined
}
hash.setData(newValue)
})
return hash
}
}