diff --git a/src/pyj/read_book/cfi.pyj b/src/pyj/read_book/cfi.pyj index 221d62acea..513ca6ad37 100644 --- a/src/pyj/read_book/cfi.pyj +++ b/src/pyj/read_book/cfi.pyj @@ -468,7 +468,7 @@ def point(cfi, doc): # {{{ try_list = [{'start':0, 'end':0, 'a':0.5}, {'start':-1, 'end':0, 'a':0}, {'start':0, 'end':1, 'a':1}] a = None rects = None - node_len = node.nodeValue.length + node_len = node.nodeValue.length if node.nodeValue else 0 offset = r.offset for v'var i = 0; i < 2; i++': # Try reducing the offset by 1 if we get no match as if it refers to the position after the