This commit is contained in:
李鹏坤-执手对影成双 2021-06-10 17:21:51 +08:00 committed by Jeremy Danyow
parent e5f5400643
commit 3c79187fcb

View File

@ -105,7 +105,8 @@ async function renderComments(issue: Issue, timeline: TimelineComponent) {
pageLoads.push(loadCommentsPage(issue.number, pageCount));
}
// if the last page is small, load the penultimate page.
if (pageCount > 2 && issue.comments % PAGE_SIZE < 3) {
if (pageCount > 2 && issue.comments % PAGE_SIZE < 3 &&
issue.comments % PAGE_SIZE !== 0) {
pageLoads.push(loadCommentsPage(issue.number, pageCount - 1));
}
// await all loads to reduce jank.