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) {
|
ApiService.manuallyStartBuildTrigger(opt_custom || {}, params).then(function(resp) {
|
||||||
$scope.allBuilds.push(resp);
|
$scope.handleBuildStarted(resp);
|
||||||
updateBuilds();
|
|
||||||
}, ApiService.errorDisplay('Could not start build'));
|
}, ApiService.errorDisplay('Could not start build'));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -261,7 +260,9 @@ angular.module('quay').directive('repoPanelBuilds', function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.handleBuildStarted = function(build) {
|
$scope.handleBuildStarted = function(build) {
|
||||||
$scope.allBuilds.push(build);
|
if (!$scope.allBuilds) {
|
||||||
|
$scope.allBuilds.push(build);
|
||||||
|
}
|
||||||
updateBuilds();
|
updateBuilds();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue