Add an NPE check to loadImageChanges

This commit is contained in:
Joseph Schorr 2014-07-17 23:00:25 -04:00
parent fc384b20a6
commit 566fda9351

View file

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