Skip to content

Commit

Permalink
Fix remove all
Browse files Browse the repository at this point in the history
  • Loading branch information
sofiamatulis committed Mar 1, 2024
1 parent 2dd72d1 commit 45ad728
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/quick-order-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ customElements.define('quick-order-list-remove-button', QuickOrderListRemoveButt
class QuickOrderListRemoveAllButton extends HTMLElement {
constructor() {
super();
const allVariants = Array.from(document.querySelectorAll('[data-quantity-variant-id]'));
this.quickOrderList = this.closest('quick-order-list');
const allVariants = this.quickOrderList.querySelectorAll('[data-quantity-variant-id]');
const items = {}
let hasVariantsInCart = false;
this.quickOrderList = this.closest('quick-order-list');

allVariants.forEach((variant) => {
const cartQty = parseInt(variant.dataset.cartQuantity);
Expand Down

0 comments on commit 45ad728

Please sign in to comment.