Skip to content
This repository was archived by the owner on Feb 28, 2022. It is now read-only.

Commit 37dd767

Browse files
committed
fix mapping: children might be null
1 parent f7053fc commit 37dd767

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.Content.Build.Code2Yaml.Steps/GenerateServiceMappingFile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ select g
5757
var oldservices = (from m in oldMapping[0].items
5858
from sm in m.items ?? Enumerable.Empty<ServiceMappingItem>()
5959
select new { SM = sm, Name = m.name }
60-
).ToDictionary(i => new ServiceCategory { Service = i.Name, Category = i.SM.name }, i => i.SM.children.ToList());
60+
).ToDictionary(i => new ServiceCategory { Service = i.Name, Category = i.SM.name }, i => i.SM.children?.ToList() ?? new List<string>());
6161
Merge(newservices, oldservices);
6262
var other = oldMapping[0].items.SingleOrDefault(i => i.name == "Other");
6363
if (other != null)

0 commit comments

Comments
 (0)