diff --git a/src/views/achievements/reducers/AchievementsReducer.tsx b/src/views/achievements/reducers/AchievementsReducer.tsx index 8ae9f004..6f8e2b11 100644 --- a/src/views/achievements/reducers/AchievementsReducer.tsx +++ b/src/views/achievements/reducers/AchievementsReducer.tsx @@ -48,7 +48,8 @@ export const AchievementsReducer: Reducer 0) { selectedCategoryName = categories[0].name; - selectedAchievementId = categories[0].achievements[0].achievementId; + + if(categories[0].achievements.length > 0) selectedAchievementId = categories[0].achievements[0].achievementId; } return { ...state, categories, selectedCategoryName, selectedAchievementId };