mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-23 01:06:48 +08:00
fix build bug
This commit is contained in:
@@ -97,6 +97,9 @@ function setItem(key: string, value: string) {
|
||||
|
||||
function getLanguage() {
|
||||
try {
|
||||
if (typeof navigator === "undefined") {
|
||||
return DEFAULT_LANG;
|
||||
}
|
||||
const locale = new Intl.Locale(navigator.language).maximize();
|
||||
const region = locale?.region?.toLowerCase();
|
||||
// 1. check region code in ALL_LANGS
|
||||
|
||||
Reference in New Issue
Block a user