mike-jumper commented on code in PR #1060:
URL: https://github.com/apache/guacamole-client/pull/1060#discussion_r1957155072


##########
guacamole/src/main/frontend/src/app/client/directives/guacClientPanel.js:
##########
@@ -84,7 +84,10 @@ angular.module('client').directive('guacClientPanel', 
['$injector', function gua
              *     panel, false otherwise.
              */
             $scope.hasClientGroups = function hasClientGroups() {
-                return $scope.clientGroups && $scope.clientGroups.length;
+                return $scope.clientGroups && 
$scope.clientGroups.filter(function(group) {
+                    // Filter out attached group as it is not shown in the 
panel
+                    return !group.attached;
+                }).length > 0;

Review Comment:
   Rather than `filter()`, which here will create a new array that is 
ultimately discarded, it would be better to use `some()`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to