@nuskin/ns-util 4.3.1 → 4.3.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/init.js +7 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-util",
3
- "version": "4.3.1",
3
+ "version": "4.3.2",
4
4
  "baseURL": "/",
5
5
  "main": "src/util.js",
6
6
  "scripts": {
package/src/init.js CHANGED
@@ -106,10 +106,13 @@ nuskin.init = (config = {}) => {
106
106
  }
107
107
 
108
108
  let runConfig = RunConfigService.getRunConfig();
109
- const [language, country] = UrlService.getLocaleFromUrl();
110
- // use locale on URL, else use en_US
111
- config.language = language || 'en';
112
- config.country = country || 'US';
109
+
110
+ if (!config.language || !config.country) {
111
+ const [language, country] = UrlService.getLocaleFromUrl();
112
+ // use locale on URL, else use en_US
113
+ config.language = language || 'en';
114
+ config.country = country || 'US';
115
+ }
113
116
 
114
117
  config.assessmentApp = config.assessmentApp || false;
115
118
  config.id = Math.floor(Math.random() * 1000000000000);