Add multiple item at a time to cart

Hello there!
i am adding multiple items to cart at a time but this is not working as expected.
Case :
when i am adding two items then the both item added to cart twice, same as when i am adding three item in the cart then the all three items are added thrice.
can anyone please help me with this ?
thanks in advance.

Which version of VSF are you using? You should wait till the item has been added if you’re adding multiple items or pass them via array to addToCart (accepts multiple items)

      const productsToAdd = []
      for (const item of products) {
        const product = await this.$store.dispatch('product/single', { options: { sku: item.sku }, setCurrentProduct: false, selectDefaultVariant: false })
        product.qty = item.qty_ordered
        productsToAdd.push(product)
      }
      await this.$store.dispatch('cart/addItems', { productsToAdd })