Skip to content

Commit

Permalink
fix: add clarifying comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dyersituations committed Dec 4, 2024
1 parent 7d05a89 commit d4e9dad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/composables/useBadgeData.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,9 @@ export default function useBadgeData() {
}
} else if (badge?.achievementData?.tiers?.length) {
const tiers = JSON.parse(JSON.stringify(badge.achievementData.tiers));
// Sort by completed date descending
tiers.sort((a, b) => {
// Handle when tiers were achieved at the same time
if (a.completedDate === b.completedDate) {
return b.level - a.level;
}
Expand Down

0 comments on commit d4e9dad

Please sign in to comment.