From 5c8f0e77182373dfa9d3821c3083715f743abc5b Mon Sep 17 00:00:00 2001 From: bptato Date: Thu, 27 Jul 2023 21:48:09 +0200 Subject: dom: fix hasChild Return true instead of false when a node with nodeType was found. --- src/html/dom.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/html') diff --git a/src/html/dom.nim b/src/html/dom.nim index b20567fb..4318c517 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -1442,7 +1442,7 @@ func countChildren(node: Node, nodeType: NodeType): int = func hasChild(node: Node, nodeType: NodeType): bool = for child in node.childList: if child.nodeType == nodeType: - return false + return true func previousSibling*(node: Node): Node {.jsfget.} = let i = node.index - 1 -- cgit 1.4.1-2-gfad0