There was an error while loading. Please reload this page.
1 parent dd8be35 commit aff47f9Copy full SHA for aff47f9
1 file changed
src/i18n/utils.ts
@@ -19,7 +19,10 @@ export function useTranslations(lang?: Lang) {
19
}
20
21
function normalizePath(path: string): string {
22
- return path === '/' ? path : path.replace(/\/$/, '');
+ if (path.length === 0) return '/';
23
+ if (path === '/') return path;
24
+
25
+ return path.replace(/\/$/, '');
26
27
28
export function isActive(linkPath: string, currentPath: string): boolean {
0 commit comments