Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit db58bdd

Browse filesBrowse files
bteacexbrayat
authored andcommitted
fix: extend Intl.getCanonicalLocales error message
1 parent 089c69d commit db58bdd
Copy full SHA for db58bdd

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎utils/getLanguage.ts

Copy file name to clipboardExpand all lines: utils/getLanguage.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function linkLocale(locale: string) {
5555
try {
5656
linkedLocale = Intl.getCanonicalLocales(locale)[0]
5757
} catch (error) {
58-
console.log(`${error.toString()}\n`)
58+
console.log(`${error.toString()}, invalid language tag: "${locale}"\n`)
5959
}
6060
switch (linkedLocale) {
6161
case 'zh-TW':

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.