@riosst100/pwa-marketplace 2.2.6 → 2.2.7
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
|
@@ -107,7 +107,7 @@ const getMediaGalleryEntries = (product, optionCodes, optionSelections) => {
|
|
|
107
107
|
const { media_gallery_entries, variants } = product;
|
|
108
108
|
const isConfigurable = isProductConfigurable(product);
|
|
109
109
|
|
|
110
|
-
let variantGallery = variants.flatMap(variant => variant.product.media_gallery_entries || []);
|
|
110
|
+
let variantGallery = variants && variants.length ? variants.flatMap(variant => variant.product.media_gallery_entries || []) : [];
|
|
111
111
|
if (variantGallery) {
|
|
112
112
|
// variantGallery = variantGallery.sort((a, b) => a.uid - b.uid);
|
|
113
113
|
}
|