Skip to content

Commit 0673de6

Browse files
committed
fix: fix empty state
1 parent aff47f9 commit 0673de6

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/i18n/utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ export function useTranslations(lang?: Lang) {
1919
}
2020

2121
function normalizePath(path: string): string {
22-
if (path.length === 0) return '/';
23-
if (path === '/') return path;
22+
if (!path || path === '/') return '/';
2423

2524
return path.replace(/\/$/, '');
2625
}

0 commit comments

Comments
 (0)