Skip to content

Commit

Permalink
simplify enum condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgerangel-msft committed Oct 16, 2024
1 parent 8bd733a commit cb9e175
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ p.Property is null
}

// Handle custom fixed enum discriminator
if (discriminator.CustomProvider?.Value?.Type is { IsEnum: true, IsValueType: true, IsStruct: false })
if (discriminator.CustomProvider?.Value?.IsEnum == true)
{
var enumMember = discriminator.CustomProvider.Value.Fields
.FirstOrDefault(f => f.Name.Equals(_inputModel.DiscriminatorValue, StringComparison.OrdinalIgnoreCase));
Expand Down

0 comments on commit cb9e175

Please sign in to comment.