@pmcretail/mapper-library 0.0.31 → 0.0.33

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.
@@ -7817,7 +7817,9 @@
7817
7817
  if (!(/** @type {?} */ (this)).webReturnObject.basket.transactionPromotion) {
7818
7818
  (/** @type {?} */ (this)).webReturnObject.basket.transactionPromotion = [];
7819
7819
  }
7820
- (/** @type {?} */ (this)).webReturnObject.basket.transactionPromotion.push(transactionPromotion);
7820
+ if (transactionPromotion && transactionPromotion.promotionId) {
7821
+ (/** @type {?} */ (this)).webReturnObject.basket.transactionPromotion.push(transactionPromotion);
7822
+ }
7821
7823
  return (/** @type {?} */ (this));
7822
7824
  }
7823
7825
  catch (error) {
@@ -7838,18 +7840,14 @@
7838
7840
  */
7839
7841
  function () {
7840
7842
  var _this = this;
7841
- /** @type {?} */
7842
- var doc;
7843
- if ((/** @type {?} */ (this)).webReturnObject.basket.transactionPromotion) {
7843
+ if ((/** @type {?} */ (this)).webReturnObject.basket.transactionPromotion && (/** @type {?} */ (this)).webReturnObject.basket.transactionPromotion.length > 0) {
7844
7844
  (/** @type {?} */ (this)).webReturnObject.basket.transactionPromotion.forEach((/**
7845
7845
  * @param {?} tr
7846
7846
  * @return {?}
7847
7847
  */
7848
7848
  function (tr) {
7849
- doc =
7850
- (/** @type {?} */ (_this)).transactionPromotionProductPortionCalc((/** @type {?} */ (_this)).webReturnObject, tr);
7849
+ (/** @type {?} */ (_this)).transactionPromotionProductPortionCalc((/** @type {?} */ (_this)).webReturnObject, tr);
7851
7850
  }));
7852
- (/** @type {?} */ (this)).webReturnObject = doc;
7853
7851
  }
7854
7852
  return (/** @type {?} */ (this));
7855
7853
  };