diff options
author | bptato <nincsnevem662@gmail.com> | 2023-01-03 04:03:59 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-01-03 04:03:59 +0100 |
commit | ade7206183ba1ea22c6b3d8c1f02deb489019e69 (patch) | |
tree | add4dd4a33dac26c15dc538fde455f5847aa6d81 /src/buffer/buffer.nim | |
parent | 222487b3a20dd18a3f024249a2cb90d00ce535bd (diff) | |
download | chawan-ade7206183ba1ea22c6b3d8c1f02deb489019e69.tar.gz |
buffer: fix infinite loop
Diffstat (limited to 'src/buffer/buffer.nim')
-rw-r--r-- | src/buffer/buffer.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/buffer/buffer.nim b/src/buffer/buffer.nim index 34674062..f54158e1 100644 --- a/src/buffer/buffer.nim +++ b/src/buffer/buffer.nim @@ -263,8 +263,9 @@ func getClickable(styledNode: StyledNode): Element = let element = Element(styledNode.node) if element.tagType in ClickableElements and (element.tagType != TAG_A or HTMLAnchorElement(element).href != ""): return element + result = styledNode.node while true: - result = styledNode.node.findAncestor(ClickableElements) + result = result.findAncestor(ClickableElements) if result == nil: break if result.tagType != TAG_A or HTMLAnchorElement(result).href != "": |