ng-easycommerce 0.0.627 → 0.0.628

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11068,8 +11068,9 @@ var ProductDetailEcComponent = /** @class */ (function (_super) {
11068
11068
  * @param changeAmount cantidad que se quiere restar.
11069
11069
  * @param forceMultiple si es true, obliga a que el resultado sea múltiplo de changeAmount.
11070
11070
  */
11071
- _this.less = function (changeAmount, forceMultiple) {
11071
+ _this.less = function (changeAmount, minimum, forceMultiple) {
11072
11072
  if (changeAmount === void 0) { changeAmount = 1; }
11073
+ if (minimum === void 0) { minimum = 1; }
11073
11074
  if (forceMultiple === void 0) { forceMultiple = false; }
11074
11075
  var newQuantity = _this.quantity - changeAmount;
11075
11076
  if (forceMultiple && changeAmount > 0) {
@@ -11083,9 +11084,12 @@ var ProductDetailEcComponent = /** @class */ (function (_super) {
11083
11084
  newQuantity = changeAmount;
11084
11085
  }
11085
11086
  }
11086
- if (newQuantity >= 1) {
11087
+ if (newQuantity >= minimum) {
11087
11088
  _this.quantity = newQuantity;
11088
11089
  }
11090
+ else {
11091
+ _this.quantity = minimum;
11092
+ }
11089
11093
  };
11090
11094
  _this.showContact = function () { return _this.show = true; };
11091
11095
  _this.hideContact = function () { return _this.show = false; };