diff --git a/static/js/directives/repo-view/repo-panel-info.js b/static/js/directives/repo-view/repo-panel-info.js index 26fc92781..eb4d9ed48 100644 --- a/static/js/directives/repo-view/repo-panel-info.js +++ b/static/js/directives/repo-view/repo-panel-info.js @@ -29,6 +29,10 @@ angular.module('quay').directive('repoPanelInfo', function () { }; $scope.getAggregatedUsage = function(stats, days) { + if (!stats || !stats.length) { + return 0; + } + var count = 0; var startDate = moment().subtract(days + 1, 'days'); for (var i = 0; i < stats.length; ++i) {