Failed to execute 'setStart' on 'Range': There is no child at offset.
This happens occasionally and I'm not sure what the fix is. Sometimes when I get the current CFI, save it, then try to go back to it I get an uncaught error inside epubjs where it is unable to find the offset from the CFI it gave me.
So here's a cfi that rendition.currentLocation().start.cfi returns:
epubcfi(/6/18[xjos]!/4/10[JS0_0]/8/17:93)
Then if I try to load the CFI with rendition.display():
Unhandled Promise rejection: DOMException: Failed to execute 'setStart' on 'Range': There is no child at offset 93.
If I replace the :93 offset with :0 in the CFI it won't crash but obviously won't always load the correct page.
Any help is much appreciated.
What is your final solution