wgt-node-utils 1.2.26 → 1.2.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +1 -1
- package/package.json +1 -1
- package/src/index.js +2 -2
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -835,8 +835,8 @@ class wgtNodeUtils {
|
|
|
835
835
|
// 从header中获取accept-language
|
|
836
836
|
const acceptLanguage = req.headers['accept-language'];
|
|
837
837
|
|
|
838
|
-
let languageCode = countryCode || (acceptLanguage ? acceptLanguage.split(',')[0].split('-')[0].toLowerCase() :
|
|
839
|
-
return LANGUAGE_CODE_LIST.some(item => item.code === languageCode) ? languageCode :
|
|
838
|
+
let languageCode = countryCode || (acceptLanguage ? acceptLanguage.split(',')[0].split('-')[0].toLowerCase() : LANGUAGE_CODE_LIST[0].code);
|
|
839
|
+
return LANGUAGE_CODE_LIST.some(item => item.code === languageCode) ? languageCode : LANGUAGE_CODE_LIST[0].code;
|
|
840
840
|
}
|
|
841
841
|
|
|
842
842
|
/**
|