Small NPE fix in JS
This commit is contained in:
parent
86584abba5
commit
ffc5e4b11e
1 changed files with 5 additions and 1 deletions
|
@ -22,12 +22,16 @@ angular.module('quay').directive('tagSpecificImagesView', function () {
|
|||
|
||||
$scope.getImageListingClasses = function(image) {
|
||||
var classes = '';
|
||||
if (!$scope.repository) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (image.ancestors.length > 1) {
|
||||
classes += 'child ';
|
||||
}
|
||||
|
||||
var currentTag = $scope.repository.tags[$scope.tag];
|
||||
if (image.id == currentTag.image_id) {
|
||||
if (currentTag && image.id == currentTag.image_id) {
|
||||
classes += 'tag-image ';
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue