Skip to content

Commit

Permalink
fix: pagination in /leaderboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Clembs committed Jul 31, 2024
1 parent 7b65992 commit 3816235
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/economy/leaderboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async function renderLeaderboard(this: Interaction, page: number) {
new GotoPageBtn(page + 1)
.setEmoji(emojis.buttons.right_arrow)
.setStyle('PRIMARY')
.setDisabled(page === Math.ceil(leaderboard.length / 10)),
.setDisabled(page === Math.ceil(leaderboard.length > 10 ? leaderboard.length / 10 : 1)),
),
),
};
Expand Down

0 comments on commit 3816235

Please sign in to comment.