From 152508e30a0f585ec6cbaeb24e583afedbc38fe2 Mon Sep 17 00:00:00 2001 From: Miguel Date: Wed, 8 May 2024 12:10:58 -0400 Subject: [PATCH] fix(product-media-gallery): validate the presence of feature_media --- .../product-media-gallery/assets/product-media-gallery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/product-media-gallery/assets/product-media-gallery.js b/components/product-media-gallery/assets/product-media-gallery.js index 4e780b5..fcbf715 100644 --- a/components/product-media-gallery/assets/product-media-gallery.js +++ b/components/product-media-gallery/assets/product-media-gallery.js @@ -12,7 +12,7 @@ export class ProductMediaGallery extends HTMLElement { handleVariantChange({ detail }) { const { sectionId, variant } = detail - if (!variant) { + if (!variant || !variant.featured_media) { return }