Skip to content

Commit

Permalink
fix: custom scrollbar does not reload after page switch
Browse files Browse the repository at this point in the history
  • Loading branch information
saicaca committed Jun 21, 2024
1 parent 960e85f commit 176b38a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ const setup = () => {
window.swup.hooks.on('link:click', () => {
document.documentElement.style.setProperty('--content-delay', '0ms')
})
window.swup.hooks.on('content:replace', initCustomScrollbar)
}
if (window.swup.hooks) {
setup()
Expand Down

0 comments on commit 176b38a

Please sign in to comment.