fix(paginator): guard getVisibleRange against not-yet-loaded documents

Second member of the 50f56ee guard family: the scroll-anchor tick
(#afterScroll) can run before the iframe document is parsed, throwing
'createTreeWalker' on null body. getVisibleRange now returns null for
that tick and #afterScroll preserves the previous visibility state.
Observed live in the Android app on PalmDOC open.
This commit is contained in:
John O'Keefe committed 2026-10-03 22:35:28 -04:00
1 parent 111898ee0e
commit b7597d6159
2 files changed
+8 -1

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "foliate-js",
"version": "0.5.1",
"version": "0.5.2",
"description": "Render e-books in the browser",
"repository": {
"type": "git",