Select the most recent build.

This commit is contained in:
jakedt 2014-03-06 12:51:20 -05:00
parent 9a733a7320
commit 372224b19f

View file

@ -1166,7 +1166,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
if ($location.search().current) { if ($location.search().current) {
$scope.setCurrentBuild($location.search().current, false); $scope.setCurrentBuild($location.search().current, false);
} else if ($scope.builds.length > 0) { } else if ($scope.builds.length > 0) {
$scope.setCurrentBuild($scope.builds[$scope.builds.length - 1].id, true); $scope.setCurrentBuild($scope.builds[0].id, true);
} }
}); });
}; };