From afebb7780d858019b1274a087d4cd3a8b7732fe5 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 17 Jul 2014 23:02:18 -0400 Subject: [PATCH] Add an NPE check to lookup up a tag's image's ancestors --- static/js/controllers.js | 1 + 1 file changed, 1 insertion(+) diff --git a/static/js/controllers.js b/static/js/controllers.js index a94ed8c1e..822c5a751 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -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]];