diff --git a/static/js/directives/ui/tag-specific-image-view.js b/static/js/directives/ui/tag-specific-image-view.js index 755d7b7ae..26fc7c4b9 100644 --- a/static/js/directives/ui/tag-specific-image-view.js +++ b/static/js/directives/ui/tag-specific-image-view.js @@ -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 '; }