Commit b160476d2e17e3ebfd4eea986ba8ec9af2fcd10b

Authored by Eric Fernandez
1 parent 7c801ad76d
Exists in master

fix productos no promo2

Showing 1 changed file with 6 additions and 3 deletions   Show diff stats
src/app/components/inicio/inicio.component.ts
... ... @@ -94,9 +94,12 @@ export class InicioComponent implements OnInit, AfterViewInit {
94 94  
95 95 let producto = this.promoAcargar ? this.promoAcargar : this.productoAcargar;
96 96  
97   - producto.productos = producto.productos.filter(producto => {
98   - return producto.idSinonimo > 0;
99   - });
  97 + if (producto.productos) {
  98 +
  99 + producto.productos = producto.productos.filter(producto => {
  100 + return producto.idSinonimo > 0;
  101 + });
  102 + }
100 103  
101 104 producto.cantidad = producto.cantidad ? producto.cantidad : 1;
102 105