diff --git a/src/composables/useBadgeData.js b/src/composables/useBadgeData.js index a100f6cfbc..340a914b81 100644 --- a/src/composables/useBadgeData.js +++ b/src/composables/useBadgeData.js @@ -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; }