Add an NPE check to lookup up a tag's image's ancestors
This commit is contained in:
parent
566fda9351
commit
afebb7780d
1 changed files with 1 additions and 0 deletions
|
@ -699,6 +699,7 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
|||
callback(tag_image);
|
||||
|
||||
// Callback any parent images.
|
||||
if (!tag_image.ancestors) { return; }
|
||||
var ancestors = tag_image.ancestors.split('/');
|
||||
for (var i = 0; i < ancestors.length; ++i) {
|
||||
var image = $scope.imageByDBID[ancestors[i]];
|
||||
|
|
Reference in a new issue