4
0
forked from crowetic/commerce

Update normalize.ts

This commit is contained in:
cond0r 2021-02-04 16:06:37 +02:00
parent 32184ecdbd
commit 9783537ca2

View File

@ -92,9 +92,7 @@ export function normalizeCart(data: Checkout): Cart {
lineItemsSubtotalPrice: data.subtotalPrice,
subtotalPrice: data.subtotalPrice,
totalPrice: data.totalPrice,
discounts: data.discountApplications?.edges.map(({ value }: any) => ({
value,
})),
discounts: [],
}
}
@ -119,8 +117,6 @@ function normalizeLineItem({
listPrice: variant?.compareAtPrice,
},
path: '',
discounts: item.discountAllocations.map(({ value }: any) => ({
value,
})),
discounts: [],
}
}