From 3c79187fcb1ad6daf5d5caf7398f952f0a5a4709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=9D=A4-=E6=89=A7=E6=89=8B=E5=AF=B9?= =?UTF-8?q?=E5=BD=B1=E6=88=90=E5=8F=8C?= Date: Thu, 10 Jun 2021 17:21:51 +0800 Subject: [PATCH] Fix #540 --- src/utterances.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utterances.ts b/src/utterances.ts index 0967b15..588bf08 100644 --- a/src/utterances.ts +++ b/src/utterances.ts @@ -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.