diff options
-rw-r--r-- | assets/js/index.js | 1 | ||||
-rw-r--r-- | static/js/pager.ts | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/assets/js/index.js b/assets/js/index.js index 62615e5..9f684bf 100644 --- a/assets/js/index.js +++ b/assets/js/index.js @@ -39,6 +39,7 @@ window.scrollTo(0, 0); } if (document.body.contains(back) && back.contains(event.target)) { + if (history.length < 2) return; event.preventDefault(); history.go(-1); } diff --git a/static/js/pager.ts b/static/js/pager.ts index 63b780d..f01de10 100644 --- a/static/js/pager.ts +++ b/static/js/pager.ts @@ -37,6 +37,7 @@ window.scrollTo(0, 0); } if (document.body.contains(back) && back.contains(event.target)) { + if (history.length < 2) return; event.preventDefault(); history.go(-1); } |