File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
src/services/Elastic.Documentation.Services Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -495,16 +495,14 @@ AccessViolationException or
495495 private static List < string > MapLabelsToAreas ( string [ ] labels , Dictionary < string , string > labelToAreasMapping )
496496 {
497497 var areas = new HashSet < string > ( ) ;
498- foreach ( var label in labels )
498+ foreach ( var label in labels . Where ( label => labelToAreasMapping . ContainsKey ( label ) ) )
499499 {
500- if ( labelToAreasMapping . TryGetValue ( label , out var mappedAreas ) )
500+ var mappedAreas = labelToAreasMapping [ label ] ;
501+ // Support comma-separated areas
502+ var areaList = mappedAreas . Split ( ',' , StringSplitOptions . RemoveEmptyEntries | StringSplitOptions . TrimEntries ) ;
503+ foreach ( var area in areaList )
501504 {
502- // Support comma-separated areas
503- var areaList = mappedAreas . Split ( ',' , StringSplitOptions . RemoveEmptyEntries | StringSplitOptions . TrimEntries ) ;
504- foreach ( var area in areaList )
505- {
506- _ = areas . Add ( area ) ;
507- }
505+ _ = areas . Add ( area ) ;
508506 }
509507 }
510508 return areas . ToList ( ) ;
You can’t perform that action at this time.
0 commit comments