diff --git a/adapters/promotion/default/promotionAdapter.js b/adapters/promotion/default/promotionAdapter.js index 65a63bd7..05f4489e 100644 --- a/adapters/promotion/default/promotionAdapter.js +++ b/adapters/promotion/default/promotionAdapter.js @@ -101,7 +101,9 @@ class PromotionAdapter extends AbstractPromotionAdapter_1.default { }); } else { - sails.log.debug(`PromotionAdapter: promotionCode.promotion should be array: \n${JSON.stringify(promotionCode, null, 2)}`); + if (promotionCode.promotion !== null) { + sails.log.debug(`PromotionAdapter: promotionCode.promotion should be array: \n${JSON.stringify(promotionCode, null, 2)}`); + } } } } diff --git a/adapters/promotion/default/promotionAdapter.ts b/adapters/promotion/default/promotionAdapter.ts index 349d29de..d07e6135 100644 --- a/adapters/promotion/default/promotionAdapter.ts +++ b/adapters/promotion/default/promotionAdapter.ts @@ -113,7 +113,9 @@ export class PromotionAdapter extends AbstractPromotionAdapter { filteredByCondition.push(p) }); } else { - sails.log.debug(`PromotionAdapter: promotionCode.promotion should be array: \n${JSON.stringify(promotionCode, null, 2)}`) + if(promotionCode.promotion !== null) { + sails.log.debug(`PromotionAdapter: promotionCode.promotion should be array: \n${JSON.stringify(promotionCode, null, 2)}`) + } } } }