@formatjs/intl-locale 2.4.41 → 2.4.42

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 +2 -2
  2. package/polyfill.iife.js +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formatjs/intl-locale",
3
- "version": "2.4.41",
3
+ "version": "2.4.42",
4
4
  "description": "Intl.Locale polyfill",
5
5
  "keywords": [
6
6
  "intl",
@@ -24,7 +24,7 @@
24
24
  "url": "https://github.com/formatjs/formatjs/issues"
25
25
  },
26
26
  "dependencies": {
27
- "@formatjs/ecma402-abstract": "1.11.0",
27
+ "@formatjs/ecma402-abstract": "1.11.1",
28
28
  "@formatjs/intl-getcanonicallocales": "1.8.0",
29
29
  "tslib": "^2.1.0"
30
30
  }
package/polyfill.iife.js CHANGED
@@ -542,10 +542,10 @@
542
542
  var BestAvailableLocale_1 = require_BestAvailableLocale();
543
543
  var utils_1 = require_utils();
544
544
  function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {
545
- var minimizedAvailableLocaleMap = Array.from(availableLocales).reduce(function(all, l2) {
546
- all[l2] = l2;
547
- return all;
548
- }, {});
545
+ var minimizedAvailableLocaleMap = {};
546
+ availableLocales.forEach(function(l2) {
547
+ return minimizedAvailableLocaleMap[l2] = l2;
548
+ });
549
549
  var minimizedAvailableLocales = new Set();
550
550
  availableLocales.forEach(function(locale2) {
551
551
  var minimizedLocale = new Intl.Locale(locale2).minimize().toString();