NPE fixes
This commit is contained in:
parent
86dfca2e3e
commit
f938f3fa43
3 changed files with 7 additions and 2 deletions
|
@ -1587,10 +1587,10 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
|
||||||
}
|
}
|
||||||
|
|
||||||
var page = kindInfo['page'];
|
var page = kindInfo['page'];
|
||||||
if (typeof page != 'string') {
|
if (page != null && typeof page != 'string') {
|
||||||
page = page(notification['metadata']);
|
page = page(notification['metadata']);
|
||||||
}
|
}
|
||||||
return page;
|
return page || '';
|
||||||
};
|
};
|
||||||
|
|
||||||
notificationService.getMessage = function(notification) {
|
notificationService.getMessage = function(notification) {
|
||||||
|
|
|
@ -569,6 +569,8 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.setImage = function(imageId, opt_updateURL) {
|
$scope.setImage = function(imageId, opt_updateURL) {
|
||||||
|
if (!$scope.images) { return; }
|
||||||
|
|
||||||
var image = null;
|
var image = null;
|
||||||
for (var i = 0; i < $scope.images.length; ++i) {
|
for (var i = 0; i < $scope.images.length; ++i) {
|
||||||
var currentImage = $scope.images[i];
|
var currentImage = $scope.images[i];
|
||||||
|
|
|
@ -262,6 +262,9 @@ ImageHistoryTree.prototype.draw = function(container) {
|
||||||
|
|
||||||
// Update the dimensions of the tree.
|
// Update the dimensions of the tree.
|
||||||
var dimensions = this.updateDimensions_();
|
var dimensions = this.updateDimensions_();
|
||||||
|
if (!dimensions) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
// Populate the tree.
|
// Populate the tree.
|
||||||
this.root_.x0 = dimensions.cw / 2;
|
this.root_.x0 = dimensions.cw / 2;
|
||||||
|
|
Reference in a new issue