Skip to content

Commit

Permalink
fix: extend Intl.getCanonicalLocales error message
Browse files Browse the repository at this point in the history
  • Loading branch information
btea authored and cexbrayat committed Dec 28, 2024
1 parent 089c69d commit db58bdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/getLanguage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function linkLocale(locale: string) {
try {
linkedLocale = Intl.getCanonicalLocales(locale)[0]
} catch (error) {
console.log(`${error.toString()}\n`)
console.log(`${error.toString()}, invalid language tag: "${locale}"\n`)
}
switch (linkedLocale) {
case 'zh-TW':
Expand Down

0 comments on commit db58bdd

Please sign in to comment.