[O] Only return valid terms

This commit is contained in:
Hykilpikonna
2019-12-07 12:24:33 -05:00
parent 2fcb5348c9
commit 6f2c5feef6
+2 -1
View File
@@ -182,7 +182,8 @@ export default class Course
get gradingPeriods(): number[]
{
let timeCode = Navigation.instance.getSelectedGradingPeriod();
return timeCode == -1 ? [0, 1, 2, 3] : [timeCode];
return (timeCode == -1 ? [0, 1, 2, 3] : [timeCode]).filter(term =>
this.termAssignments[term].filter(a => a.graded).length != 0);
}
/**