From c9592ba954daa59d13eabbf847ea9972f0d266e7 Mon Sep 17 00:00:00 2001 From: Riku Rauhala Date: Tue, 29 Oct 2024 14:15:44 +0200 Subject: [PATCH] [Study programmes] Fix crashing when excluding graduated --- .../src/components/StudyProgramme/StudyTrackOverview/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/frontend/src/components/StudyProgramme/StudyTrackOverview/index.jsx b/services/frontend/src/components/StudyProgramme/StudyTrackOverview/index.jsx index 03257d672e..2fcb758091 100644 --- a/services/frontend/src/components/StudyProgramme/StudyTrackOverview/index.jsx +++ b/services/frontend/src/components/StudyProgramme/StudyTrackOverview/index.jsx @@ -127,7 +127,7 @@ export const StudyTrackOverview = ({ return { studyTrackStatsGraduationStats, studyTrackStatsClassSizes } } - if (studyProgrammeHasStudyTracks && Object.keys(stats?.data?.graduationTimes || {}).length > 0) { + if (studyProgrammeHasStudyTracks && Object.keys(stats?.data?.graduationTimes || {}).length > 1) { studyTrackStatsGraduationStats.basic = calculateStudyTrackStats() if (stats?.data?.doCombo) { studyTrackStatsGraduationStats.combo = calculateStudyTrackStats(true)