diff --git a/src/pyj/read_book/prefs/head_foot.pyj b/src/pyj/read_book/prefs/head_foot.pyj index 6eae29f6fd..212e0c5f3a 100644 --- a/src/pyj/read_book/prefs/head_foot.pyj +++ b/src/pyj/read_book/prefs/head_foot.pyj @@ -128,6 +128,8 @@ def format_time_left(seconds): def format_pos(progress_frac, length): + if length < 1: + return '' pages = Math.ceil(length / 1000) pos = progress_frac * pages return f'{pos:.1f} / {pages}'