Make sure the applications array is defined so that a new app can be created even before the existing list has loaded

This commit is contained in:
Joseph Schorr 2014-07-15 11:57:46 -04:00
parent 8eacbfbce4
commit c9a33c60b2

View file

@ -2534,6 +2534,7 @@ quayApp.directive('applicationManager', function () {
},
controller: function($scope, $element, ApiService) {
$scope.loading = false;
$scope.applications = [];
$scope.createApplication = function(appName) {
if (!appName) { return; }
@ -2574,7 +2575,7 @@ quayApp.directive('applicationManager', function () {
ApiService.getOrganizationApplications(null, params).then(function(resp) {
$scope.loading = false;
$scope.applications = resp['applications'];
$scope.applications = resp['applications'] || [];
});
};