Commit b50c944e9b5f0395515b32304f43a138d9c1d131

Authored by Marcelo Puebla
1 parent f2d7b8237d
Exists in develop

Fix

Metodo para agregar articulos al carrito
Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
src/app/services/articulo/articulo.service.ts
... ... @@ -57,9 +57,9 @@ export class ArticuloService {
57 57 for (const articuloCarrito of this.carrito) {
58 58 if (articuloCarrito.id === articulo.id) {
59 59 if (!articuloCarrito.productos) break;
60   - let samePromo = false;
  60 + let samePromo = true;
61 61 articuloCarrito.productos.forEach((a, i) => {
62   - samePromo = (a.id === articulo.productos[i].id);
  62 + if (samePromo) samePromo = (a.id === articulo.productos[i].id);
63 63 });
64 64 if (!samePromo) break;
65 65 this.addCant(articuloCarrito);