mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-23 14:40:50 +01:00
Extra check to Achievements
This commit is contained in:
parent
e0b7acd368
commit
d5e6a79c8a
@ -48,7 +48,8 @@ export const AchievementsReducer: Reducer<IAchievementsState, IAchievementsActio
|
|||||||
if(categories.length > 0)
|
if(categories.length > 0)
|
||||||
{
|
{
|
||||||
selectedCategoryName = categories[0].name;
|
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 };
|
return { ...state, categories, selectedCategoryName, selectedAchievementId };
|
||||||
|
Loading…
Reference in New Issue
Block a user