From 450d55921665b95c71a4b2e96a2367c830e286f2 Mon Sep 17 00:00:00 2001 From: Tetardtek Date: Sat, 28 Mar 2026 18:39:27 +0100 Subject: [PATCH] fix: guard claimedMilestones in MilestonesPanel component --- Frontend/src/components/MilestonesPanel.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Frontend/src/components/MilestonesPanel.tsx b/Frontend/src/components/MilestonesPanel.tsx index 6b2633c..f8c65d5 100644 --- a/Frontend/src/components/MilestonesPanel.tsx +++ b/Frontend/src/components/MilestonesPanel.tsx @@ -13,7 +13,8 @@ export function MilestonesPanel() { const claimable = getClaimableMilestones(state); const nextMilestone = getNextMilestone(state); - const totalClaimed = state.claimedMilestones.length; + const claimed = state.claimedMilestones ?? []; + const totalClaimed = claimed.length; return (
@@ -73,7 +74,7 @@ export function MilestonesPanel() { {/* Liste compacte des milestones passés */} {totalClaimed > 0 && claimable.length === 0 && (
- {PRESTIGE_MILESTONES.filter((m) => state.claimedMilestones.includes(m.id)).map((m) => ( + {PRESTIGE_MILESTONES.filter((m) => claimed.includes(m.id)).map((m) => (