Fix the series view next button not disabling when on the last page
All checks were successful
Test / build (push) Successful in 9s

This commit is contained in:
Ethan Lane 2024-07-13 15:11:50 +01:00
parent b6f814f895
commit 5a4a0a1e10

View file

@ -52,7 +52,7 @@ export default class SeriesHelper {
.setCustomId(`series view ${seriesId} ${page + 1}`)
.setLabel("Next")
.setStyle(ButtonStyle.Primary)
.setDisabled(page + 1 > totalPages));
.setDisabled(page + 1 == totalPages));
const buffer = await ImageHelper.GenerateCardImageGrid(cardsOnPage.map(x => ({id: x.id, path: x.path})), userId);
const image = new AttachmentBuilder(buffer, { name: "page.png" });