Compare commits
1 Commits
main
...
accidental
Author | SHA1 | Date |
---|---|---|
Greg Johnston | 8278cbbf4e |
|
@ -273,7 +273,8 @@ where
|
||||||
// I can imagine some edge case that the child changes while
|
// I can imagine some edge case that the child changes while
|
||||||
// hydration is ongoing
|
// hydration is ongoing
|
||||||
if !HydrationCtx::is_hydrating() {
|
if !HydrationCtx::is_hydrating() {
|
||||||
if !was_child_moved && child != new_child {
|
let same_child = child == new_child;
|
||||||
|
if !was_child_moved && !same_child {
|
||||||
// Remove the child
|
// Remove the child
|
||||||
let start = child.get_opening_node();
|
let start = child.get_opening_node();
|
||||||
let end = &closing;
|
let end = &closing;
|
||||||
|
@ -308,10 +309,13 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mount the new child
|
// Mount the new child
|
||||||
mount_child(
|
// If it's the same child, don't re-mount
|
||||||
MountKind::Before(&closing),
|
if !same_child {
|
||||||
&new_child,
|
mount_child(
|
||||||
);
|
MountKind::Before(&closing),
|
||||||
|
&new_child,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We want to reuse text nodes, so hold onto it if
|
// We want to reuse text nodes, so hold onto it if
|
||||||
|
|
Loading…
Reference in New Issue