Skip to content

Commit

Permalink
fix(nav): double slash causes invalid url
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-rb committed Nov 2, 2024
1 parent 5638971 commit 7531c6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function useLocale() {
},
applyPathPrefix: (path: string) => {
const link = getLocaleLink(currentLocale());
if (link === "/") return path;
if (link === "/") return path.startsWith("/") ? path.slice(1) : path;
let p = path;
if (p.startsWith("/")) p = p.slice(1);
return `${link}${p}`;
Expand Down

0 comments on commit 7531c6f

Please sign in to comment.