Fix NPE
This commit is contained in:
parent
3b3102478a
commit
b63b378088
1 changed files with 4 additions and 3 deletions
|
@ -233,8 +233,7 @@ angular.module('quay').directive('repoPanelBuilds', function () {
|
|||
};
|
||||
|
||||
ApiService.manuallyStartBuildTrigger(opt_custom || {}, params).then(function(resp) {
|
||||
$scope.allBuilds.push(resp);
|
||||
updateBuilds();
|
||||
$scope.handleBuildStarted(resp);
|
||||
}, ApiService.errorDisplay('Could not start build'));
|
||||
};
|
||||
|
||||
|
@ -261,7 +260,9 @@ angular.module('quay').directive('repoPanelBuilds', function () {
|
|||
};
|
||||
|
||||
$scope.handleBuildStarted = function(build) {
|
||||
$scope.allBuilds.push(build);
|
||||
if (!$scope.allBuilds) {
|
||||
$scope.allBuilds.push(build);
|
||||
}
|
||||
updateBuilds();
|
||||
};
|
||||
}
|
||||
|
|
Reference in a new issue