From dcfa08fa3c851f61400f5b4e56c392c7d8c34713 Mon Sep 17 00:00:00 2001 From: Chris McCord Date: Mon, 19 Feb 2024 17:45:52 -0500 Subject: [PATCH] use new node if not found in existing tree --- lib/phoenix_live_view/test/dom.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/phoenix_live_view/test/dom.ex b/lib/phoenix_live_view/test/dom.ex index 19c6a6430..dfad25d0b 100644 --- a/lib/phoenix_live_view/test/dom.ex +++ b/lib/phoenix_live_view/test/dom.ex @@ -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 =