Skip to content

Commit

Permalink
prevent double hash in react strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
joetannenbaum committed Jan 15, 2025
1 parent db95d4c commit f61d2f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ class CurrentPage {
}

public setUrlHash(hash: string): void {
this.page.url += hash
if (!this.page.url.includes(hash)) {
this.page.url += hash
}
}

public remember(data: Page['rememberedState']): void {
Expand Down

0 comments on commit f61d2f9

Please sign in to comment.