Protect the status list from empty items
authorMike Rylander <mrylander@gmail.com>
Fri, 8 Apr 2016 15:52:18 +0000 (11:52 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Fri, 3 Nov 2017 20:03:53 +0000 (16:03 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/web/js/ui/default/staff/services/ui.js

index 4c894f8..8f6c932 100644 (file)
@@ -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();
                             });