mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-23 11:56:27 +01:00
Workaround for some element nodes not having dataset
This commit is contained in:
parent
9a6b7ae923
commit
ac0969b9e9
1 changed files with 1 additions and 1 deletions
|
|
@ -249,7 +249,7 @@ def node_at_index(nodes, target, index, iter_text_nodes):
|
||||||
for i in range(nodes.length):
|
for i in range(nodes.length):
|
||||||
node = nodes[i]
|
node = nodes[i]
|
||||||
is_element = node.nodeType is Node.ELEMENT_NODE
|
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)
|
q, index = node_at_index(unwrapped_nodes(node), target, index, iter_text_nodes)
|
||||||
if q:
|
if q:
|
||||||
return q, index
|
return q, index
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue