|
|
@@ -349,7 +349,7 @@ export class OrderCalculator {
|
|
|
p.test(ctx, order).then(Boolean),
|
|
|
);
|
|
|
if (applicableOrderPromotions.length) {
|
|
|
- order.shippingLines.forEach(line => (line.adjustments = []));
|
|
|
+ order.shippingLines.forEach(line => line.clearAdjustments());
|
|
|
for (const promotion of applicableOrderPromotions) {
|
|
|
// re-test the promotion on each iteration, since the order total
|
|
|
// may be modified by a previously-applied promotion
|
|
|
@@ -365,9 +365,10 @@ export class OrderCalculator {
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- // If there is no applicable promotion for shipping, we should remove already assigned adjustment from shipping lines.
|
|
|
+ // If there is no applicable promotion for shipping,
|
|
|
+ // we should remove already assigned adjustment from shipping lines.
|
|
|
for (const shippingLine of order.shippingLines) {
|
|
|
- shippingLine.removeAdjustments();
|
|
|
+ shippingLine.clearAdjustments();
|
|
|
}
|
|
|
}
|
|
|
}
|