contentful-import 9.0.1 → 9.0.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.
|
@@ -29,6 +29,14 @@ function sortByFallbackKey(localeByFallback, key) {
|
|
|
29
29
|
sortedLocales.forEach(locale => {
|
|
30
30
|
sortByFallbackKey(localeByFallback, locale.code).forEach(x => sortedLocales.push(x));
|
|
31
31
|
});
|
|
32
|
+
|
|
33
|
+
// We have to reset the undefined fallback code to null so that the locales are properly created without fallback and
|
|
34
|
+
// not the default (en-US)
|
|
35
|
+
sortedLocales.forEach(locale => {
|
|
36
|
+
if (!locale.fallbackCode) {
|
|
37
|
+
locale.fallbackCode = null;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
32
40
|
return sortedLocales;
|
|
33
41
|
}
|
|
34
42
|
module.exports = exports.default;
|