mirror of
https://github.com/withastro/astro.git
synced 2025-01-22 18:41:55 -05:00
* Update logger.ts Solving #2625 * chore: add changeset Co-authored-by: Nate Moore <nate@skypack.dev>
This commit is contained in:
parent
a9656e743b
commit
2e5c3b5126
2 changed files with 6 additions and 1 deletions
5
.changeset/twelve-eggs-join.md
Normal file
5
.changeset/twelve-eggs-join.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fix issue when process.env.LANG was longer than 5 characters
|
|
@ -18,7 +18,7 @@ function getLoggerLocale(): string {
|
|||
// Check if language code is atleast two characters long (ie. en, es).
|
||||
// NOTE: if "c" locale is encountered, the default locale will be returned.
|
||||
if (extractedLocale.length < 2) return defaultLocale;
|
||||
else return extractedLocale;
|
||||
else return extractedLocale.substring(0, 5);
|
||||
} else return defaultLocale;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue