Skip to content

Commit

Permalink
Fix getCombinedLeaderboard not returning weekly (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
OIRNOIR authored Mar 7, 2023
1 parent 98472f0 commit 4a978de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AmariBot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class AmariBot {
// combine the two leaderboards
const combinedLeaderboard = mainLeaderboard.data.map((x) => {
const weeklyData = weeklyLeaderboard.data.find((y) => y.id === x.id)
const user: APIUser = { weeklyExp: weeklyData?.exp || 0, ...x }
const user: APIUser = { ...x, weeklyExp: weeklyData?.exp ?? 0 }
return user
})

Expand Down

0 comments on commit 4a978de

Please sign in to comment.