pim-import 6.1.1 → 6.1.3
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/pim/methods/products.js +1 -4
- package/dist/utils.js +5 -0
- package/package.json +1 -1
|
@@ -600,10 +600,7 @@ const getProductData = async (productEntry, productDetails) => {
|
|
|
600
600
|
}
|
|
601
601
|
else {
|
|
602
602
|
(0, logs_1.log)(`Add thumbnail imgix wrapper with id ${wrapperImgixID} to Contentful`);
|
|
603
|
-
const altText = (0, utils_1.getPimTranslations)(pimAssetThumb, "title");
|
|
604
|
-
if (altText[defaultEnvironmentLocaleCode] === null) {
|
|
605
|
-
altText[defaultEnvironmentLocaleCode] = "Thumbnail";
|
|
606
|
-
}
|
|
603
|
+
const altText = (0, utils_1.getPimTranslations)(pimAssetThumb, "title", "Thumbnail");
|
|
607
604
|
const wrapperImgixAttributes = (0, imgix_1.getDefaultWrapperImgixAttributesByPimUrl)(pimAssetThumb.url);
|
|
608
605
|
if (wrapperImgixAttributes) {
|
|
609
606
|
const wrapperImgixFields = {
|
package/dist/utils.js
CHANGED
|
@@ -81,6 +81,11 @@ const getPimTranslations = (values, fieldKey = "value", defaultValue = "", limit
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
if (defaultValue && Object.entries(names).length === 0) {
|
|
85
|
+
for (const locale of contentful_1.cfLocales) {
|
|
86
|
+
names[locale] = defaultValue;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
84
89
|
return names;
|
|
85
90
|
};
|
|
86
91
|
exports.getPimTranslations = getPimTranslations;
|