File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
functions-discount-js/src Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import {
1717export function cartDeliveryOptionsDiscountsGenerateRun(input) {
1818 const firstDeliveryGroup = input.cart.deliveryGroups[0];
1919 if (!firstDeliveryGroup) {
20- throw new Error("No delivery groups found") ;
20+ return {operations: []} ;
2121 }
2222
2323 const hasShippingDiscountClass = input.discount.discountClasses.includes(
@@ -68,7 +68,7 @@ export function cartDeliveryOptionsDiscountsGenerateRun(
6868): CartDeliveryOptionsDiscountsGenerateRunResult {
6969 const firstDeliveryGroup = input.cart.deliveryGroups[0];
7070 if (!firstDeliveryGroup) {
71- throw new Error("No delivery groups found") ;
71+ return {operations: []} ;
7272 }
7373
7474 const hasShippingDiscountClass = input.discount.discountClasses.includes(
You can’t perform that action at this time.
0 commit comments