Skip to content

Commit

Permalink
Merge pull request #78 from edx/schen/EDUCATOR-3925
Browse files Browse the repository at this point in the history
fix(bug): make sure gradebook rounding handle null input
  • Loading branch information
schenedx authored Jan 17, 2019
2 parents c0ab04f + a7316e6 commit 34eaa31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/Gradebook/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export default class Gradebook extends React.Component {
return 'Tracks';
};

roundGrade = percent => parseFloat(percent.toFixed(DECIMAL_PRECISION));
roundGrade = percent => parseFloat((percent || 0).toFixed(DECIMAL_PRECISION));

formatter = {
percent: (entries, areGradesFrozen) => entries.map((entry) => {
Expand Down

0 comments on commit 34eaa31

Please sign in to comment.