test
parent
c873f5de66
commit
755d7c7102
|
@ -1134,10 +1134,17 @@ class VariantSelects extends HTMLElement {
|
|||
|
||||
console.log('mediaGallery.dataset', mediaGallery.dataset);
|
||||
|
||||
let index = 0;
|
||||
|
||||
for (const galleryImage of galleryImages) {
|
||||
// if display is not none, then show the image
|
||||
if (galleryImage.style.display !== 'none') {
|
||||
|
||||
if (index < 1) {
|
||||
index++;
|
||||
continue;
|
||||
}
|
||||
|
||||
console.log('galleryImage.dataset', galleryImage.dataset);
|
||||
|
||||
const target = galleryImage.dataset.target; // "template--22806669590804__main-38794319626516"
|
||||
|
@ -1146,6 +1153,7 @@ class VariantSelects extends HTMLElement {
|
|||
|
||||
mediaGallery.setActiveMedia(`${this.dataset.section}-${targetIdSplit}`, true);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue