Fix stats NPE

This commit is contained in:
Joseph Schorr 2016-06-22 15:43:15 -04:00
parent 9e8782328c
commit 61573604ef

View file

@ -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) {