hook fix
This commit is contained in:
@@ -133,7 +133,7 @@ async function idmPictureModuleProducts(containerEL) {
|
||||
},
|
||||
body: JSON.stringify({
|
||||
query: `{${productsId.reduce(
|
||||
(acc, val, index) => acc + `${idmGetSingleProdGraphQL(val)}`,
|
||||
(acc, val) => acc + `${idmGetSingleProdGraphQL(val)}`,
|
||||
""
|
||||
)}}`,
|
||||
}),
|
||||
@@ -143,8 +143,8 @@ async function idmPictureModuleProducts(containerEL) {
|
||||
const products = Object.values(data?.data)?.map((prod) => prod.product);
|
||||
|
||||
allProdEl.forEach((prodEl) => {
|
||||
const prodData = products.find((p) => p.id === +prodEl.dataset.id);
|
||||
if (!prodData) return;
|
||||
const prodData = products.find((p) => p?.id === +prodEl?.dataset?.id);
|
||||
if (!prodData) return prodEl.closest(".idm_picture__product")?.remove();
|
||||
|
||||
prodEl.classList.add("--mod-init");
|
||||
prodEl.innerHTML = `
|
||||
|
||||
Reference in New Issue
Block a user