Skip to content

Commit

Permalink
docs(examples/grades): don't show average if undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexcited committed May 25, 2024
1 parent 51cf0a6 commit 9019e97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/grades-overview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import { authenticatePronoteCredentials, PronoteApiAccountId, PronoteApiGradeTyp
console.log("-> Grade is optional, only counted if value increases the student's average.");

console.log("Grade: ", handleGradeValue(grade.value, grade.outOf, grade.coefficient));
console.log("Average:", handleGradeValue(grade.average, grade.outOf, grade.coefficient));
if (grade.average) console.log("Average:", handleGradeValue(grade.average, grade.outOf, grade.coefficient));
console.log("Minimum:", handleGradeValue(grade.min, grade.outOf, grade.coefficient));
console.log("Maximum:", handleGradeValue(grade.max, grade.outOf, grade.coefficient));
if (grade.subjectFile) console.log("Subject:", grade.subjectFile.name, "=>", grade.subjectFile.url);
Expand Down

0 comments on commit 9019e97

Please sign in to comment.