Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
447 B
3
Indexable
Never
      const cartSubItemsMap = new Map();
      this.cartElements.forEach((element) => {
        element.sub_items.forEach((subItem) => {
          cartSubItemsMap.set(subItem.product_id, subItem.hash);
        });
      });

      this.incompatibleServices.forEach((service) => {
        const subItemHash = cartSubItemsMap.get(service.product_id);

        if (subItemHash) {
          possibleServiceHashes.push(subItemHash);
        }
      });