Skip to content

Commit

Permalink
fix: re-render same URL upon forward/backward navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Nov 3, 2024
1 parent 10966dc commit 6620e1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vike/client/client-routing-runtime/initOnPopState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function initOnPopState() {

const isUserPushStateNavigation = current.state.triggeredBy === 'user' || previous.state.triggeredBy === 'user'

const isHashNavigation = removeHash(current.url) === removeHash(previous.url)
const isHashNavigation = removeHash(current.url) === removeHash(previous.url) && current.url !== previous.url
// - `isNewState === true` when:
// - Click on `<a href="#some-hash" />` (note that Vike's `initOnLinkClick()` handler skips hash links)
// - `location.hash = 'some-hash'`
Expand Down

0 comments on commit 6620e1c

Please sign in to comment.