Skip to content

Commit

Permalink
use new node if not found in existing tree
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismccord committed Feb 19, 2024
1 parent 04d1921 commit dcfa08f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/phoenix_live_view/test/dom.ex
Original file line number Diff line number Diff line change
Expand Up @@ -436,12 +436,12 @@ defmodule Phoenix.LiveViewTest.DOM do
container_id = attribute(node, "id")
verify_phx_update_id!("ignore", container_id, node)

{new_tag, new_attrs, _children} = node
{new_tag, new_attrs, new_children} = node

{tag, attrs_before, children_before} =
case by_id(html_tree, container_id) do
{_tag, _attrs_before, _children_before} = triplet -> triplet
nil -> {new_tag, [], []}
nil -> {new_tag, new_attrs, new_children}
end

merged_attrs =
Expand Down

0 comments on commit dcfa08f

Please sign in to comment.