Skip to content

Commit

Permalink
Merge pull request #2264 from graphcommerce-org/fix/shipping-method-t…
Browse files Browse the repository at this point in the history
…itle

fix: prevent rendering 'null' when method_title is not provided
  • Loading branch information
paales authored May 23, 2024
2 parents 7085502 + e5291a4 commit 0e803a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/lucky-lizards-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphcommerce/magento-cart-shipping-method": patch
---

prevent rendering 'null' when method_title is not provided
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function ShippingMethodActionCard(props: ShippingMethodActionCardProps) {
const isFree = amount && amount.value === 0

const title =
carrier_title === 'Free Shipping' ? carrier_title : `${carrier_title} ${method_title}`
carrier_title === 'Free Shipping' ? carrier_title : `${carrier_title} ${method_title || ''}`

return (
<ActionCard
Expand Down

0 comments on commit 0e803a1

Please sign in to comment.