diff options
author | bptato <nincsnevem662@gmail.com> | 2023-07-27 21:48:09 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-07-27 21:48:09 +0200 |
commit | 5c8f0e77182373dfa9d3821c3083715f743abc5b (patch) | |
tree | 0f674cf7d0347799ff0428d2c936e4f9277efbb4 /src | |
parent | a5edc0a92a02116e08acba0c1e0a9d91b5fd6688 (diff) | |
download | chawan-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.nim | 2 |
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 |