diff --git a/lib/custom_wizard/builder.rb b/lib/custom_wizard/builder.rb index a44b1192..63fdf75a 100644 --- a/lib/custom_wizard/builder.rb +++ b/lib/custom_wizard/builder.rb @@ -256,17 +256,19 @@ class CustomWizard::Builder with_type: true } ).perform - - if content && content[:type] == 'association' - content[:result] = content[:result].map do |item| - { - id: item[:key], - name: item[:value] - } - end - end - params[:content] = content[:result] + if content.present? + if content[:type] == 'association' + content[:result] = content[:result].map do |item| + { + id: item[:key], + name: item[:value] + } + end + end + + params[:content] = content[:result] + end end field = step.add_field(params)