From 8fba7ac3f4d53e35179c86b0030b1946ccfad551 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Fri, 8 Apr 2016 11:52:18 -0400 Subject: [PATCH] Protect the status list from empty items Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton --- Open-ILS/web/js/ui/default/staff/services/ui.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); }); -- 2.11.0