Small NPE fix in JS

This commit is contained in:
Joseph Schorr 2016-02-10 14:36:47 +02:00
parent 86584abba5
commit ffc5e4b11e

View file

@ -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 ';
}