dom: fix bug in collection get_next

This commit is contained in:
Pierre Tachoire
2023-11-16 17:21:15 +01:00
parent 9b923c550b
commit 3ca6a4a74e

View File

@@ -60,7 +60,7 @@ pub const HTMLCollection = struct {
// TODO deinit parent
// Back to the prev's parent.
// If prev has no parent, then the loop must stop.
parent = parser.nodeParentNode(cur) orelse break;
parent = parser.nodeParentNode(prev) orelse break;
// TODO deinit lastchild
lastchild = parser.nodeLastChild(parent);