From: Mike Rylander Date: Fri, 8 Apr 2016 15:52:18 +0000 (-0400) Subject: Protect the status list from empty items X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8fba7ac3f4d53e35179c86b0030b1946ccfad551;p=working%2FEvergreen.git Protect the status list from empty items Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/web/js/ui/default/staff/services/ui.js b/Open-ILS/web/js/ui/default/staff/services/ui.js index 4c894f8324..8f6c9322e9 100644 --- a/Open-ILS/web/js/ui/default/staff/services/ui.js +++ b/Open-ILS/web/js/ui/default/staff/services/ui.js @@ -712,7 +712,8 @@ function($modal , $interpolate , egCore) { if ($scope.mode == 'checkin' && next_statuses.length > 0) { $scope.get_copy_statuses().then(function() { angular.forEach(next_statuses, function(st) { - $scope.next_statuses.push(egCore.env.ccs.list[st]); + if (egCore.env.ccs.list[st]) + $scope.next_statuses.push(egCore.env.ccs.list[st]); }); $scope.params.the_next_status = $scope.next_statuses[0].id(); });