Commit 8ff98ef99e1cff386d1547d7e63c7540166483e2
Exists in
master
Merge branch 'master' into 'master'
Master(mpuebla) See merge request !50
Showing
1 changed file
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(); |