Fix Github issue #695
Caused by Page.move_to_bottom() setting self.nav.page_index to -1, only possible when there are no comments on a submission, but which also caused a crash when rendering.
This commit is contained in:
@@ -236,6 +236,12 @@ class Page(object):
|
||||
"""
|
||||
Move the cursor to the last item on the page.
|
||||
"""
|
||||
|
||||
# If the page is empty, don't try to go to the bottom, rtv will
|
||||
# crash when rendering
|
||||
if self.content.range[1] < 0:
|
||||
return
|
||||
|
||||
self.nav.page_index = self.content.range[1]
|
||||
self.nav.cursor_index = 0
|
||||
self.nav.inverted = True
|
||||
|
||||
Reference in New Issue
Block a user