Skip to content

Commit

Permalink
Use URL.parse to fix Version Switcher url double slash issue
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasFlamy committed Feb 11, 2025
1 parent b40963e commit 2353b6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/components/version-switcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function VersionSwitcher(): JSX.Element {
mobile={windowSize === 'mobile'}
items={versions.map(({ label, url }) => ({
label,
to: url + location.pathname + location.hash,
to: URL.parse(location.pathname + location.hash, url).href,
target: '_self',
}))}
/>
Expand Down

0 comments on commit 2353b6e

Please sign in to comment.