Skip to content

Commit 5debabe

Browse files
committed
scroll to hash on bypassed pages
1 parent 05dfb5e commit 5debabe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gatsby-browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function scrollToAnchor(location, mainNavHeight = 100) {
5454
}
5555

5656
const bypassPages = ['/', '/tutorials/v3/', '/rustdocs/', '/playground/']
57-
if (location && bypassPages.includes(location.pathname)) {
57+
if (location && !location.hash && bypassPages.includes(location.pathname)) {
5858
window.scrollTo(0, 0)
5959
}
6060

0 commit comments

Comments
 (0)