diff --git a/app/helpers/injection_helper.rb b/app/helpers/injection_helper.rb index 4e1d1cd1ff..4a026a7422 100644 --- a/app/helpers/injection_helper.rb +++ b/app/helpers/injection_helper.rb @@ -62,7 +62,9 @@ module InjectionHelper end def inject_current_order_cycle - inject_json_ams "orderCycleData", current_order_cycle, Api::OrderCycleSerializer + serializer = Api::OrderCycleSerializer.new(current_order_cycle) + json = serializer.object.present? ? serializer.to_json : "{}" + render partial: "json/injection_ams", locals: { name: "orderCycleData", json: json } end def inject_available_shipping_methods