pull/1/head
Jan Umbach 2024-05-28 18:33:06 +02:00
parent da8e5f01af
commit a9dc1e76ac
1 changed files with 2 additions and 4 deletions

View File

@ -1134,15 +1134,13 @@ class VariantSelects extends HTMLElement {
console.log('mediaGallery.elements.thumbnails', mediaGallery.elements.thumbnails);
let index = 0;
for (const galleryImage of galleryImages) {
// if display is not none, then show the image
console.log("galleryImage.getAttribute('thumbnail-alt')", galleryImage.getAttribute('thumbnail-alt'));
if (galleryImage.getAttribute('thumbnail-alt') === this.currentVariant.featured_image.alt) {
if (index <= 0) {
index++;
// check if galleryImage is a video
if (!galleryImage.classList.contains('thumbnail-list__item--video')) {
continue;
}