From 517235982b52e4fc78f135d50a304e7f6d986ca3 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sat, 7 Sep 2019 16:48:46 -0400 Subject: [PATCH] [F] Fix return type void --- src/utils/gpa-utils.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/utils/gpa-utils.ts b/src/utils/gpa-utils.ts index 0ebeb3c..4f58431 100644 --- a/src/utils/gpa-utils.ts +++ b/src/utils/gpa-utils.ts @@ -90,10 +90,10 @@ export class GPAUtils * * @param course Course */ - public static getGP(course: Course) + public static getGP(course: Course): number { // Find the GPA for this course. - return this.SCALE.forEach(scale => + for (let scale of this.SCALE) { // Letter grades are the same if (scale[this.LETTER] == course.letterGrade) @@ -107,6 +107,8 @@ export class GPAUtils // That's it return grade; } - }) + } + + return -1; } }