Open morwin10 opened 8 years ago
So I fix it so :
item.prototype. = function(quantity, relative){ var quantityInt = parseInt(quantity); if (quantityInt % 1 === 0){ if (relative === true){ this._quantity += quantityInt; return this._quantity; // fix } else { this._quantity = quantityInt; return this._quantity; // fix } if (this._quantity < 1) this._quantity = 1; } else { this._quantity = 1; $log.info('Quantity must be an integer and was defaulted to 1'); }
So I fix it so :