fix: array out of bounds when processing CalendarProgress

This commit is contained in:
Sainan 2025-06-27 00:37:00 +02:00
parent 4f1f9592b0
commit 0c3ec57ea3

View File

@ -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;