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

Commit

Permalink
fix mapping: children might be null
Browse files Browse the repository at this point in the history
  • Loading branch information
ansyral committed Jun 15, 2017
1 parent f7053fc commit 37dd767
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ select g
var oldservices = (from m in oldMapping[0].items
from sm in m.items ?? Enumerable.Empty<ServiceMappingItem>()
select new { SM = sm, Name = m.name }
).ToDictionary(i => new ServiceCategory { Service = i.Name, Category = i.SM.name }, i => i.SM.children.ToList());
).ToDictionary(i => new ServiceCategory { Service = i.Name, Category = i.SM.name }, i => i.SM.children?.ToList() ?? new List<string>());
Merge(newservices, oldservices);
var other = oldMapping[0].items.SingleOrDefault(i => i.name == "Other");
if (other != null)
Expand Down

0 comments on commit 37dd767

Please sign in to comment.