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();