Skip to content
Snippets Groups Projects
Commit bcfaa92d authored by Scott Berg's avatar Scott Berg
Browse files

ROENROLL-1477

parent fcd59170
No related branches found
No related tags found
No related merge requests found
......@@ -277,8 +277,10 @@ export class TermContainerComponent implements OnInit, OnDestroy {
sumPlannedCredits(courses: ReadonlyArray<Course>): string {
const credits = { min: 0, max: 0 };
courses.forEach(course => {
credits.min = credits.min + course.creditMin;
credits.max = credits.max + course.creditMax;
if (course.creditMin !== undefined && course.creditMax !== undefined) {
credits.min = credits.min + course.creditMin;
credits.max = credits.max + course.creditMax;
}
});
return credits.min === credits.max
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment