diff --git a/server/static/scripts/controllers/builds.js b/server/static/scripts/controllers/builds.js
index 617823e5a..3f73ae937 100644
--- a/server/static/scripts/controllers/builds.js
+++ b/server/static/scripts/controllers/builds.js
@@ -66,7 +66,7 @@
*/
function BuildCtrl($scope, $routeParams, $window, logs, builds, repos, users) {
- var step = parseInt($routeParams.step);
+ var step = parseInt($routeParams.step) || 1;
var number = $routeParams.number;
var owner = $routeParams.owner;
var name = $routeParams.name;
@@ -110,17 +110,6 @@
// Gets the build
builds.get(fullName, number).then(function(payload){
$scope.build = payload.data;
-
- // if only 1 build, select first
- if (!step && payload.data.builds.length === 1) {
- step = 1;
-
- // else if only 1 step, but multiple builds
- // we should only render the list of builds
- } else if (!step) {
- return;
- }
-
$scope.task = payload.data.builds[step-1];
if (['pending', 'killed'].indexOf($scope.task.state) !== -1) {
diff --git a/server/static/scripts/views/build.html b/server/static/scripts/views/build.html
index 804a0b952..c22adda69 100644
--- a/server/static/scripts/views/build.html
+++ b/server/static/scripts/views/build.html
@@ -30,10 +30,8 @@
-
-