Closed ankemp closed 7 years ago
Just a simple change that uses array.prototype.reduce() to do what the for() loop was doing.
for()
Also updated cartItems to have a default (and type is inherited from default (int)). Also wrapped all logic in your if(this.globalCart) statement because of cartItems now having a default
cartItems
if(this.globalCart)
@ankemp thanks bud
Just a simple change that uses array.prototype.reduce() to do what the
for()
loop was doing.Also updated
cartItems
to have a default (and type is inherited from default (int)). Also wrapped all logic in yourif(this.globalCart)
statement because ofcartItems
now having a default