[FIX] website_sale_aplicoop: fix aplicoopShop -> groupOrderShop reference
After infinite scroll loads new products, the event listeners were never re-attached because the code was looking for window.aplicoopShop but the actual object is window.groupOrderShop.
This commit is contained in:
parent
3eeca66551
commit
d3f26120b0
1 changed files with 3 additions and 3 deletions
|
|
@ -422,10 +422,10 @@ console.log("[INFINITE_SCROLL] Script loaded!");
|
||||||
|
|
||||||
// Re-attach event listeners for newly added products
|
// Re-attach event listeners for newly added products
|
||||||
if (
|
if (
|
||||||
window.aplicoopShop &&
|
window.groupOrderShop &&
|
||||||
typeof window.aplicoopShop._attachEventListeners === "function"
|
typeof window.groupOrderShop._attachEventListeners === "function"
|
||||||
) {
|
) {
|
||||||
window.aplicoopShop._attachEventListeners();
|
window.groupOrderShop._attachEventListeners();
|
||||||
console.log("[INFINITE_SCROLL] Event listeners re-attached");
|
console.log("[INFINITE_SCROLL] Event listeners re-attached");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue