diff --git a/packages/features/medusa-storefront/src/modules/order/components/shipping-details/index.tsx b/packages/features/medusa-storefront/src/modules/order/components/shipping-details/index.tsx index e83564c..dc8ad5b 100644 --- a/packages/features/medusa-storefront/src/modules/order/components/shipping-details/index.tsx +++ b/packages/features/medusa-storefront/src/modules/order/components/shipping-details/index.tsx @@ -9,6 +9,10 @@ type ShippingDetailsProps = { } const ShippingDetails = ({ order }: ShippingDetailsProps) => { + if (!order.shipping_methods || order.shipping_methods.length === 0) { + return null; + } + return (
@@ -58,7 +62,7 @@ const ShippingDetails = ({ order }: ShippingDetailsProps) => { {(order as any).shipping_methods[0]?.name} ( {convertToLocale({ - amount: order.shipping_methods?.[0].total ?? 0, + amount: order.shipping_methods?.[0]?.total ?? 0, currency_code: order.currency_code, }) .replace(/,/g, "")