forked from OpenWF/SpaceNinjaServer
fix: array out of bounds when processing CalendarProgress
This commit is contained in:
parent
d79e7c0274
commit
d8ff601be7
@ -674,7 +674,7 @@ export const addMissionInventoryUpdates = async (
|
||||
const calendarProgress = getCalendarProgress(inventory);
|
||||
const currentSeason = getWorldState().KnownCalendarSeasons[0];
|
||||
calendarProgress.SeasonProgress.LastCompletedChallengeDayIdx = currentSeason.Days.findIndex(
|
||||
x => x.events[0].challenge == value[value.length - 1].challenge
|
||||
day => day.events.length != 0 && day.events[0].challenge == value[value.length - 1].challenge
|
||||
);
|
||||
checkCalendarChallengeCompletion(calendarProgress, currentSeason);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user