frontend/public: minor fixes
This commit is contained in:
parent
9d36e55227
commit
0b2e61faef
2 changed files with 5 additions and 2 deletions
|
|
@ -155,7 +155,10 @@ angular.module("FICApp")
|
|||
$scope.themes = themes;
|
||||
$scope.max_gain = 0;
|
||||
angular.forEach(themes, function(theme, key) {
|
||||
this[key].exercice_count = Object.keys(theme.exercices).length;
|
||||
if (theme.exercices)
|
||||
this[key].exercice_count = Object.keys(theme.exercices).length;
|
||||
else
|
||||
this[key].exercice_count = 0;
|
||||
this[key].gain = 0;
|
||||
angular.forEach(theme.exercices, function(ex, k) {
|
||||
this.gain += ex.gain;
|
||||
|
|
|
|||
Reference in a new issue