This commit is contained in:
hailin 2025-04-21 01:35:46 +08:00
parent 6b450fc03a
commit 53371f3523
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ export default function HomeRedirector() {
const pathLocale = currentPath.split('/')[1]
const hasLocaleInPath = isValidLocale(pathLocale)
if (!hasLocaleInPath) {
if (currentPath === "/" && !hasLocaleInPath) {
const newPath = `/${preferred}${currentPath}`
console.log('[HomeRedirector] Redirecting to:', newPath)
router.replace(newPath)