Fix adding nodes to nested fragments (#4929)
* Fix adding nodes to nested fragments * add note about test
This commit is contained in:
1 parent
1236296ea6
commit
b252dc0620
2 files changed
+83
-3
No files matched your search
@@ -188,10 +188,10 @@ impl VNode {
|
||||
Some((idx, Placeholder(_) | Text(_))) => {
|
||||
ElementId(dom.get_mounted_dyn_node(mount_id, idx))
|
||||
}
|
||||
// The node is a fragment, so we need to find the first element in the fragment
|
||||
// The node is a fragment, so we need to find the last element in the fragment
|
||||
Some((_, Fragment(children))) => {
|
||||
let child = children.first().unwrap();
|
||||
child.find_first_element(dom)
|
||||
let child = children.last().unwrap();
|
||||
child.find_last_element(dom)
|
||||
}
|
||||
// The node is a component, so we need to find the first element in the component
|
||||
Some((id, Component(_))) => {
|
||||
|
||||
Reference in new issue
Block a user