Commit 41ed6251851c520a30bacf61be1eaca8f82e1cc0

Authored by Marcelo Puebla
1 parent a5ce8e8021
Exists in master

arreglo del producto PEBETE.

Showing 1 changed file with 3 additions and 2 deletions   Show diff stats
src/app/components/inicio/inicio.component.ts
... ... @@ -91,8 +91,9 @@ export class InicioComponent implements OnInit {
91 91 }
92 92  
93 93 confirmarProducto() {
94   - this.promoAcargar.cantidad = 1;
95   - this.productoService.productos.push(this.promoAcargar);
  94 + var producto = this.promoAcargar ? this.promoAcargar : this.productoAcargar;
  95 + producto.cantidad = 1;
  96 + this.productoService.productos.push(producto);
96 97 this.productoService.productoAcargar = this.promoAcargar = this.productoAcargar = undefined;
97 98 this.promociones = [];
98 99 this.popoverDirective.hide();