Skip to content

Commit

Permalink
fix null ref
Browse files Browse the repository at this point in the history
  • Loading branch information
Shazwazza committed Jun 7, 2024
1 parent ee2b6f0 commit 7da01b6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public Task ApplyAsync(HttpContext httpContext, CandidateSet candidates)
for (var i = 0; i < candidates.Count; i++)
{
// If the candidate is an Articulate dynamic controller, set valid
if (candidates[i].Endpoint.Metadata.GetMetadata<ArticulateDynamicRouteAttribute>() is not null)
if (candidates[i].Endpoint?.Metadata?.GetMetadata<ArticulateDynamicRouteAttribute>() is not null)
{
candidates.SetValidity(i, true);
}
Expand Down

0 comments on commit 7da01b6

Please sign in to comment.