Skip to content

Commit

Permalink
Merge pull request #24 from thejoaov/fix-locale-error
Browse files Browse the repository at this point in the history
fix: default locale not loading
  • Loading branch information
thejoaov authored Jan 21, 2024
2 parents 8400c7d + e852aa9 commit 10cd1f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export default function getTranslation(key: keyof typeof en): string {
en: en,
}

return locales[locale || 'en'][key] ?? key
return (locales[locale] || locales.en)[key] ?? key
}

0 comments on commit 10cd1f0

Please sign in to comment.