mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-02-23 17:59:49 +08:00
Not to detect user lang when running in Node
Use DEFAULT_LANG with Node. Remove the logging on the server side: [Lang] failed to detect user lang.
This commit is contained in:
parent
bcb18ff2f4
commit
3f5a189591
@ -66,6 +66,9 @@ function setItem(key: string, value: string) {
|
||||
}
|
||||
|
||||
function getLanguage() {
|
||||
if (typeof process === "object") {
|
||||
return DEFAULT_LANG;
|
||||
}
|
||||
try {
|
||||
return navigator.language.toLowerCase();
|
||||
} catch {
|
||||
|
Loading…
Reference in New Issue
Block a user