Skip to content

Commit 9846531

Browse files
🐛 Actually push the fix ya doofus.
1 parent 867a29f commit 9846531

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

src/lustre/vdom/virtualise.ffi.mjs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,7 @@ export const virtualise = (root) => {
4343
}
4444

4545
if (root.childNodes.length === 1) {
46-
return virtualiseChild(rootMeta, root, child, 0).vnode;
47-
}
48-
49-
for (let child = root.firstChild; child; child = child.nextSibling) {
50-
const result = virtualiseChild(rootMeta, root, child, 0);
51-
// lustre view functions always return a single root element inside the root.
52-
// even if we could virtualise multiple children, we will ignore them and
53-
// return the first child as the one we'll take over.
54-
//
55-
// A top-level key is impossible and always ignored.
56-
if (result) return result.vnode;
46+
return virtualiseChild(rootMeta, root, root.firstChild, 0).vnode;
5747
}
5848

5949
// no virtualisable children, we can empty the node and return our default text node.

0 commit comments

Comments
 (0)