From 41ed6251851c520a30bacf61be1eaca8f82e1cc0 Mon Sep 17 00:00:00 2001 From: mpuebla Date: Thu, 22 Aug 2019 12:09:51 -0300 Subject: [PATCH] arreglo del producto PEBETE. --- src/app/components/inicio/inicio.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/components/inicio/inicio.component.ts b/src/app/components/inicio/inicio.component.ts index 96b0865..40af3fc 100644 --- a/src/app/components/inicio/inicio.component.ts +++ b/src/app/components/inicio/inicio.component.ts @@ -91,8 +91,9 @@ export class InicioComponent implements OnInit { } confirmarProducto() { - this.promoAcargar.cantidad = 1; - this.productoService.productos.push(this.promoAcargar); + var producto = this.promoAcargar ? this.promoAcargar : this.productoAcargar; + producto.cantidad = 1; + this.productoService.productos.push(producto); this.productoService.productoAcargar = this.promoAcargar = this.productoAcargar = undefined; this.promociones = []; this.popoverDirective.hide(); -- 1.9.1