diff --git a/static/js/directives/ui/robots-manager.js b/static/js/directives/ui/robots-manager.js index ca672c4be..6c706adf8 100644 --- a/static/js/directives/ui/robots-manager.js +++ b/static/js/directives/ui/robots-manager.js @@ -85,6 +85,8 @@ angular.module('quay').directive('robotsManager', function () { }; $scope.findRobotIndexByName = function(name) { + if (!$scope.robots) { return -1; } + for (var i = 0; i < $scope.robots.length; ++i) { if ($scope.robots[i].name == name) { return i;