diff --git a/static/js/controllers.js b/static/js/controllers.js index 5a53be0de..936886fc5 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -940,7 +940,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope } }); - $scope.builds = []; + $scope.builds = null; $scope.polling = false; $scope.buildDialogShowCounter = 0; @@ -1004,6 +1004,8 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope }; $scope.setCurrentBuild = function(buildId, opt_updateURL) { + if (!$scope.builds) { return; } + // Find the build. for (var i = 0; i < $scope.builds.length; ++i) { if ($scope.builds[i].id == buildId) { diff --git a/static/partials/repo-build.html b/static/partials/repo-build.html index 4ff47b487..f7aec4838 100644 --- a/static/partials/repo-build.html +++ b/static/partials/repo-build.html @@ -18,7 +18,11 @@ -