Skip to content

Commit

Permalink
Add null conditional operator
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieKimani1 committed Aug 31, 2023
1 parent ab9648c commit e666d3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Microsoft.OpenApi.Readers/V2/OpenApiV2Deserializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private static void ProcessAnyListFields<T>(

mapNode.Context.StartObject(anyListFieldName);

var list = anyListFieldMap[anyListFieldName].PropertyGetter(domainObject);
var list = anyListFieldMap[anyListFieldName]?.PropertyGetter(domainObject);
if (list != null)
{
foreach (var propertyElement in list)
Expand Down

0 comments on commit e666d3d

Please sign in to comment.