mirror of
https://github.com/vercel/commerce.git
synced 2025-05-20 08:26:59 +00:00
fix: fix reshape function for new cart
This commit is contained in:
parent
99d93093c7
commit
5bcf6cb5eb
@ -70,15 +70,15 @@ const reshapeCart = (cart: MedusaCart): Cart => {
|
||||
const currencyCode = 'EUR';
|
||||
const cost = {
|
||||
subtotalAmount: {
|
||||
amount: (cart.total && cart.tax_total && cart.total - cart.tax_total)?.toString() || '0',
|
||||
amount: (cart?.total && cart?.tax_total && cart.total - cart.tax_total)?.toString() || '0',
|
||||
currencyCode
|
||||
},
|
||||
totalAmount: {
|
||||
amount: (cart.tax_total && cart.tax_total.toString()) || '0',
|
||||
amount: (cart?.tax_total && cart?.tax_total.toString()) || '0',
|
||||
currencyCode
|
||||
},
|
||||
totalTaxAmount: {
|
||||
amount: (cart.tax_total && cart.tax_total.toString()) || '0',
|
||||
amount: (cart?.tax_total && cart?.tax_total.toString()) || '0',
|
||||
currencyCode
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user