From 062f952d161e0531ab035985d5795356f4c69ee5 Mon Sep 17 00:00:00 2001 From: Xavier Lien Date: Sat, 18 May 2024 18:43:25 -0400 Subject: [PATCH] Fix typescript error (#155) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: “xavilien” <“xavilien@gmail.com”> --- frontend/src/app/fce.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/fce.ts b/frontend/src/app/fce.ts index b3ae4ae..c82b72f 100644 --- a/frontend/src/app/fce.ts +++ b/frontend/src/app/fce.ts @@ -140,7 +140,7 @@ export const aggregateCourses = ( if (findCourse.length > 0) workload += parseUnits(findCourse[0].units); } - const totalUnits = courses.reduce((acc, curr) => acc + parseUnits(curr.units) + parseUnits(curr.manualUnits), 0); + const totalUnits = courses.reduce((acc, curr) => acc + parseUnits(curr.units) + parseUnits(curr.manualUnits || ""), 0); const varUnits = courses.filter((course) => !isValidUnits(course.units)); if (varUnits.length > 0) { unitsMessage.push(