fix: ensure existing forms is a list before adding

This commit is contained in:
Zach Daniel 2021-07-18 17:09:04 -04:00
parent e07e8da22f
commit b058f6b276

View file

@ -1209,6 +1209,8 @@ defmodule AshPhoenix.Form do
%{new_form | id: form.id <> "[#{key}]"}
:list ->
forms = List.wrap(forms)
if opts[:prepend] do
[new_form | forms]
else