From 7c8ca2dadd8112b6091838d3067f84235490c7b2 Mon Sep 17 00:00:00 2001 From: Remington Steed Date: Fri, 8 Mar 2019 15:27:45 -0500 Subject: [PATCH] LP1793196 Fix console error when none selected If you open the dropdown and close it without selecting anything, the console shows an error complaining that $scope.selected is undefined. This commit checks that it exists in that case before using it. Signed-off-by: Remington Steed Signed-off-by: Dan Wells --- Open-ILS/web/js/ui/default/staff/services/ui.js | 2 +- 1 file changed, 1 insertion(+), 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 85b21eece3..7579504c0c 100644 --- a/Open-ILS/web/js/ui/default/staff/services/ui.js +++ b/Open-ILS/web/js/ui/default/staff/services/ui.js @@ -980,7 +980,7 @@ function($uibModal , $interpolate , egCore) { $scope.isopen = $scope.clickedopen || ($filter('filter')( $scope.list, $scope.selected - ).length > 0 && $scope.selected.length > 0); + ).length > 0 && $scope.selected && $scope.selected.length > 0); if ($scope.clickedclosed) { $scope.isopen = false; $scope.clickedclosed = null; -- 2.11.0