mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 08:13:43 +08:00 
			
		
		
		
	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:
		@@ -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 {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user