Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuprog committed May 28, 2024
1 parent c8d3d2e commit 1c2f3a5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/polymorphic_embed/html/component.ex
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,12 @@ if Code.ensure_loaded?(Phoenix.HTML) && Code.ensure_loaded?(Phoenix.HTML.Form) &
|> Keyword.take([:multipart])
|> Keyword.merge(options)

type = get_polymorphic_type(parent_form, field_name)

forms =
to_form(
parent_form.source,
parent_form,
field_name,
[{:polymorphic_type, type} | options]
options
)

seen_ids = for f <- forms, vid = f.params[@persistent_id], into: %{}, do: {vid, true}
Expand Down

0 comments on commit 1c2f3a5

Please sign in to comment.