about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-07-27 21:48:09 +0200
committerbptato <nincsnevem662@gmail.com>2023-07-27 21:48:09 +0200
commit5c8f0e77182373dfa9d3821c3083715f743abc5b (patch)
tree0f674cf7d0347799ff0428d2c936e4f9277efbb4 /src
parenta5edc0a92a02116e08acba0c1e0a9d91b5fd6688 (diff)
downloadchawan-5c8f0e77182373dfa9d3821c3083715f743abc5b.tar.gz
dom: fix hasChild
Return true instead of false when a node with nodeType was found.
Diffstat (limited to 'src')
-rw-r--r--src/html/dom.nim2
1 files changed, 1 insertions, 1 deletions
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