Use history.replaceState
on initial redirect
This commit is contained in:
parent
301faa43e2
commit
f19d11f555
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ function getHash() {
|
|||
for (let i = 0; i < idLen; i++) {
|
||||
id += chars[Math.floor(Math.random() * chars.length)];
|
||||
}
|
||||
window.location.hash = id;
|
||||
window.history.replaceState(null, "", "#" + id);
|
||||
}
|
||||
return window.location.hash.slice(1);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue