mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-1078: Only traverse child connection groups if defined.
This commit is contained in:
@@ -62,13 +62,22 @@ angular.module('manage').directive('locationChooser', [function locationChooser(
|
||||
*/
|
||||
var connectionGroups = {};
|
||||
|
||||
/**
|
||||
* Recursively traverses the given connection group and all
|
||||
* children, storing each encountered connection group within the
|
||||
* connectionGroups map by its identifier.
|
||||
*
|
||||
* @param {GroupListItem} group
|
||||
* The connection group to traverse.
|
||||
*/
|
||||
var mapConnectionGroups = function mapConnectionGroups(group) {
|
||||
|
||||
// Map given group
|
||||
connectionGroups[group.identifier] = group;
|
||||
|
||||
// Map all child groups
|
||||
group.childConnectionGroups.forEach(mapConnectionGroups);
|
||||
if (group.childConnectionGroups)
|
||||
group.childConnectionGroups.forEach(mapConnectionGroups);
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user