mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Workaround for some element nodes not having dataset
This commit is contained in:
parent
9a6b7ae923
commit
ac0969b9e9
@ -249,7 +249,7 @@ def node_at_index(nodes, target, index, iter_text_nodes):
|
||||
for i in range(nodes.length):
|
||||
node = nodes[i]
|
||||
is_element = node.nodeType is Node.ELEMENT_NODE
|
||||
if is_element and node.dataset.calibreRangeWrapper:
|
||||
if is_element and node.dataset?.calibreRangeWrapper:
|
||||
q, index = node_at_index(unwrapped_nodes(node), target, index, iter_text_nodes)
|
||||
if q:
|
||||
return q, index
|
||||
|
Loading…
x
Reference in New Issue
Block a user