diff --git a/frontend/static/js/public.js b/frontend/static/js/public.js index 4bef654e..121658e3 100644 --- a/frontend/static/js/public.js +++ b/frontend/static/js/public.js @@ -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; diff --git a/frontend/static/public.html b/frontend/static/public.html index 24c38884..8e165af2 100644 --- a/frontend/static/public.html +++ b/frontend/static/public.html @@ -120,7 +120,7 @@ - Niveau {{ lvl }} + Challenge {{ lvl }} {{ exercice.solved }}