diff --git a/admin/app/components/solidus_admin/orders/index/component.rb b/admin/app/components/solidus_admin/orders/index/component.rb index 3872c65fe08..9cdaaad7eda 100644 --- a/admin/app/components/solidus_admin/orders/index/component.rb +++ b/admin/app/components/solidus_admin/orders/index/component.rb @@ -158,7 +158,7 @@ def payment_column { header: :payment, data: ->(order) do - component('ui/badge').new(name: order.payment_state&.humanize, color: order.paid? ? :green : :yellow) + component('ui/badge').new(name: order.payment_state.humanize, color: order.paid? ? :green : :yellow) if order.payment_state? end } end @@ -167,7 +167,7 @@ def shipment_column { header: :shipment, data: ->(order) do - component('ui/badge').new(name: order.shipment_state&.humanize, color: order.shipped? ? :green : :yellow) + component('ui/badge').new(name: order.shipment_state.humanize, color: order.shipped? ? :green : :yellow) if order.shipment_state? end } end