Skip to content

Commit

Permalink
fix: langRoutePrefix should end with slash
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Oct 30, 2024
1 parent ae1bf88 commit 5f94ea0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/theme-default/src/logic/useLocaleSiteData.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { NormalizedLocales } from '@rspress/shared';
import { addTrailingSlash, type NormalizedLocales } from '@rspress/shared';
import { usePageData } from '@rspress/runtime';

export function useLocaleSiteData(): NormalizedLocales {
Expand Down Expand Up @@ -26,6 +26,6 @@ export function useLocaleSiteData(): NormalizedLocales {

return {
...localeInfo,
langRoutePrefix: lang === defaultLang ? '/' : lang,
langRoutePrefix: lang === defaultLang ? '/' : addTrailingSlash(lang),
} as NormalizedLocales;
}

0 comments on commit 5f94ea0

Please sign in to comment.