Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Xziy committed Jan 30, 2024
1 parent bab9dd5 commit e9b19b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion adapters/promotion/default/promotionAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`);
}
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion adapters/promotion/default/promotionAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`)
}
}
}
}
Expand Down

0 comments on commit e9b19b1

Please sign in to comment.