Skip to content

Commit

Permalink
[Product] fix product modal not showing variant image (Shopify#3483)
Browse files Browse the repository at this point in the history
* fix product modal not showing variant image

* reuse existing const var as per feedback
  • Loading branch information
ludoboludo authored May 23, 2024
1 parent 492b8ce commit 89a6911
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -1157,8 +1157,8 @@ class VariantSelects extends HTMLElement {
}

// update media modal
const modalContent = document.querySelector(`#ProductModal-${this.dataset.section} .product-media-modal__content`);
const newModalContent = html.querySelector(`product-modal`);
const modalContent = document.querySelector(`#ProductModal-${sectionId} .product-media-modal__content`);
const newModalContent = html.querySelector(`#ProductModal-${sectionId} .product-media-modal__content`);
if (modalContent && newModalContent) modalContent.innerHTML = newModalContent.innerHTML;
}

Expand Down

0 comments on commit 89a6911

Please sign in to comment.