Skip to content

Commit 53d6b38

Browse files
committed
added the promotions
1 parent 7b09fe4 commit 53d6b38

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

dist/breinify-activities.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,7 @@
735735

736736
var len = promotions.length;
737737
var hasIds = len > 0;
738+
var hasPromotions = len > 0;
738739
var promotionAmounts = [];
739740
var promotionIds = [];
740741

@@ -753,6 +754,7 @@
753754
}
754755

755756
hasIds = hasIds && !Breinify.UTL.isEmpty(promotionId);
757+
hasPromotions = hasPromotions && !Breinify.UTL.isEmpty(promotionAmount);
756758

757759
promotionIds.push(promotionId);
758760
promotionAmounts.push(promotionAmount);
@@ -761,7 +763,7 @@
761763
if (hasIds) {
762764
return $.extend(true, {}, tags, {
763765
'promotionIds': hasIds ? promotionIds : null,
764-
'promotionAmounts': hasIds ? promotionAmounts : null
766+
'promotionAmounts': hasPromotions ? promotionAmounts : null
765767
});
766768
} else {
767769
throw new Error('Promotions must have an identifier: ' + JSON.stringify(promotions));

0 commit comments

Comments
 (0)