Don't browse to hash if there isn't one
This commit is contained in:
parent
996f7b9c2a
commit
34293553a8
1 changed files with 4 additions and 0 deletions
|
@ -61,6 +61,10 @@ window.addEventListener("load", () => {
|
||||||
window.addEventListener("DOMContentLoaded", () => {
|
window.addEventListener("DOMContentLoaded", () => {
|
||||||
setHeroHeight();
|
setHeroHeight();
|
||||||
|
|
||||||
|
if (window.location.hash <= 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let scrollTarget = null;
|
let scrollTarget = null;
|
||||||
try {
|
try {
|
||||||
scrollTarget = document.getElementById(window.location.hash.slice(1));
|
scrollTarget = document.getElementById(window.location.hash.slice(1));
|
||||||
|
|
Loading…
Reference in a new issue