Add an NPE check to loadImageChanges
This commit is contained in:
parent
fc384b20a6
commit
566fda9351
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Reference in a new issue