diff --git a/src/components/manga/ChapterCard.tsx b/src/components/manga/ChapterCard.tsx index 316d04a8..3847f690 100644 --- a/src/components/manga/ChapterCard.tsx +++ b/src/components/manga/ChapterCard.tsx @@ -83,9 +83,15 @@ export const ChapterCard: React.FC = (props: IProps) => { if (key === 'markPrevRead') { const index = allChapters.findIndex(({ id: chapterId }) => chapterId === chapter.id); + + const isFirstChapter = index + 1 > allChapters.length - 1; + if (isFirstChapter) { + return; + } + requestManager.updateChapters( allChapters - .slice(index) + .slice(index + 1) .filter(({ isRead }) => !isRead) .map(({ id: chapterId }) => chapterId), { isRead: true, chapterIdsToDelete },