Fix stats NPE
This commit is contained in:
parent
9e8782328c
commit
61573604ef
1 changed files with 4 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Reference in a new issue