Skip to content

Commit

Permalink
fix leaderboard array being overflowed, causing coin lb to break (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyper-neutrino authored May 24, 2024
1 parent 92c6d15 commit 8bedc02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commandDetails/coin/leaderboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const getCoinLeaderboardEmbed = async (
leaderboard = await getCoinLeaderboard(LEADERBOARD_LIMIT_FETCH, offset);
i = 0;
}
if (leaderboard.length === 0) {
if (i >= leaderboard.length) {
break;
}
const userCoinEntry = leaderboard[i++];
Expand Down

0 comments on commit 8bedc02

Please sign in to comment.