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() {
|
function getLanguage() {
|
||||||
|
if (typeof process === "object") {
|
||||||
|
return DEFAULT_LANG;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
return navigator.language.toLowerCase();
|
return navigator.language.toLowerCase();
|
||||||
} catch {
|
} catch {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user