Add an NPE check to lookup up a tag's image's ancestors

This commit is contained in:
Joseph Schorr 2014-07-17 23:02:18 -04:00
parent 566fda9351
commit afebb7780d

View file

@ -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]];