Skip to content

Commit b5efb06

Browse files
authored
[fix] Scroll to Page Top (#11)
1 parent 866cd1f commit b5efb06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/History.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export class History {
100100

101101
if (path.startsWith('#'))
102102
try {
103-
if (document.querySelector(path))
103+
if (document.querySelector(path) || path === '#top')
104104
return scrollTo(path, event.currentTarget as Element);
105105
} catch {}
106106

0 commit comments

Comments
 (0)