Skip to content

Commit

Permalink
Fix bug where prefetching crashes on the last page
Browse files Browse the repository at this point in the history
  • Loading branch information
akazukin5151 committed Mar 8, 2022
1 parent 3654fed commit 3ddf3c9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions koneko/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ def _prefetch_next_page(self) -> 'IO':
# Else next_url won't be set yet
self._maybe_join_thread()

if self._data.next_url is None:
return True
# For some reason, if next_url is None, this statement doesn't catch it (???)
if not (
self._data.next_url
or self._data.next_offset.isdigit()
Expand Down

0 comments on commit 3ddf3c9

Please sign in to comment.