mirror of
https://github.com/vercel/commerce.git
synced 2025-05-20 08:26:59 +00:00
fix: empty cart error
This commit is contained in:
parent
f8747bd506
commit
1971f1a7d1
@ -64,7 +64,7 @@ export default async function medusaRequest(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const reshapeCart = (cart: MedusaCart): Cart => {
|
const reshapeCart = (cart: MedusaCart): Cart => {
|
||||||
const lines = cart.items?.map((item) => reshapeLineItem(item)) || [];
|
const lines = cart?.items?.map((item) => reshapeLineItem(item)) || [];
|
||||||
const totalQuantity = lines.length;
|
const totalQuantity = lines.length;
|
||||||
const checkoutUrl = '/';
|
const checkoutUrl = '/';
|
||||||
const currencyCode = 'EUR';
|
const currencyCode = 'EUR';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user