Extra check to Achievements

This commit is contained in:
MyNameIsBatman 2021-09-19 18:01:27 -03:00
parent e0b7acd368
commit d5e6a79c8a

View File

@ -48,7 +48,8 @@ export const AchievementsReducer: Reducer<IAchievementsState, IAchievementsActio
if(categories.length > 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 };