mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-30 00:23:21 +00:00 
			
		
		
		
	GUAC-1078: Only traverse child connection groups if defined.
This commit is contained in:
		| @@ -62,12 +62,21 @@ angular.module('manage').directive('locationChooser', [function locationChooser( | |||||||
|              */ |              */ | ||||||
|             var connectionGroups = {}; |             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) { |             var mapConnectionGroups = function mapConnectionGroups(group) { | ||||||
|  |  | ||||||
|                 // Map given group |                 // Map given group | ||||||
|                 connectionGroups[group.identifier] = group; |                 connectionGroups[group.identifier] = group; | ||||||
|  |  | ||||||
|                 // Map all child groups |                 // Map all child groups | ||||||
|  |                 if (group.childConnectionGroups) | ||||||
|                     group.childConnectionGroups.forEach(mapConnectionGroups); |                     group.childConnectionGroups.forEach(mapConnectionGroups); | ||||||
|  |  | ||||||
|             }; |             }; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user