not-locale 0.0.26 → 0.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "not-locale",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "not-* family module for localization in not- environment",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -150,17 +150,18 @@ class nsLocale {
150
150
  }
151
151
 
152
152
  selectBest() {
153
+ let defaultLocale = "ru";
153
154
  if (navigator.languages) {
154
- let locale = navigator.languages.find((itm) => {
155
+ const navigatorLocale = navigator.languages.find((itm) => {
155
156
  return this.locales.includes(itm);
156
157
  });
157
- if (locale) {
158
- return locale;
158
+ if (navigatorLocale) {
159
+ defaultLocale = navigatorLocale;
159
160
  }
160
161
  }
161
162
  return this.app.getWorking(
162
163
  "locale",
163
- this.app.getOptions("modules.locale.default", "ru")
164
+ this.app.getOptions("modules.locale.default", defaultLocale)
164
165
  );
165
166
  }
166
167
  }