From: Remington Steed <rjs7@calvin.edu> Date: Fri, 8 Mar 2019 20:27:45 +0000 (-0500) Subject: LP1793196 Fix console error when none selected X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1c061dd30a02a03bfe9d8043057b28e87aa910b2;p=evergreen%2Fequinox.git 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 <rjs7@calvin.edu> Signed-off-by: Dan Wells <dbw2@calvin.edu> --- 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 59ff1c8414..0fe9918e37 100644 --- a/Open-ILS/web/js/ui/default/staff/services/ui.js +++ b/Open-ILS/web/js/ui/default/staff/services/ui.js @@ -982,7 +982,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;