From 566fda93510bff6445579130cd6890ce2175f935 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 17 Jul 2014 23:00:25 -0400 Subject: [PATCH] Add an NPE check to loadImageChanges --- static/js/controllers.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static/js/controllers.js b/static/js/controllers.js index 985a6c361..a94ed8c1e 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -450,6 +450,8 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi }; $scope.loadImageChanges = function(image) { + if (!image) { return; } + var params = {'repository': namespace + '/' + name, 'image_id': image.id}; $scope.currentImageChangeResource = ApiService.getImageChangesAsResource(params).get(function(ci) { $scope.currentImageChanges = ci;