Merge pull request #1648 from yaojingguo/not-to-detect-user-lang-in-node
Not to detect user lang when running in Node
This commit is contained in:
commit
697c7a8dfe
|
@ -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…
Reference in New Issue