Merge pull request #1222 from coreos-inc/jsnpefix

Small NPE fix in JS
This commit is contained in:
josephschorr 2016-02-11 21:41:27 +02:00
commit 7b99a594f4

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