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 calendarProgress = getCalendarProgress(inventory);
|
||||||
const currentSeason = getWorldState().KnownCalendarSeasons[0];
|
const currentSeason = getWorldState().KnownCalendarSeasons[0];
|
||||||
calendarProgress.SeasonProgress.LastCompletedChallengeDayIdx = currentSeason.Days.findIndex(
|
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);
|
checkCalendarChallengeCompletion(calendarProgress, currentSeason);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user