aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.js b/main.js
index 6eccc24..9e27824 100644
--- a/main.js
+++ b/main.js
@@ -276,7 +276,7 @@ window.addEventListener("hashchange", () => {
if (newid == oldid) {
const newoff = document.getElementById("main").lastChild.offsetTop;
document.documentElement.scrollTop = newoff - (oldoff - oldscroll)
- }
+ } else document.documentElement.scrollTop = oldscroll;
state.path = newpath;