This commit is contained in:
Kovid Goyal 2024-08-19 09:51:32 +05:30
parent 6e6ca80d62
commit 7a50e5cb5c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -243,7 +243,7 @@ def get_annot_id_for(node, offset, annot_id_uuid_map):
if not node:
return
if node.nodeType is Node.ELEMENT_NODE:
if node.dataset.calibreRangeWrapper:
if node.dataset?.calibreRangeWrapper:
return annot_id_uuid_map[node.dataset.calibreRangeWrapper]
if offset is 0:
if node.firstChild?.nodeType is Node.ELEMENT_NODE and node.firstChild.dataset?.calibreRangeWrapper: