forked from MapComplete/MapComplete
Refactoring: properly handle the hash
This commit is contained in:
parent
d6d9438bc7
commit
1ec76b66b5
8 changed files with 230 additions and 89 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue