Skip to content

Commit 7da01b6

Browse files
committed
fix null ref
1 parent ee2b6f0 commit 7da01b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Articulate/Routing/ArticulateDynamicRouteSelectorPolicy.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public Task ApplyAsync(HttpContext httpContext, CandidateSet candidates)
5656
for (var i = 0; i < candidates.Count; i++)
5757
{
5858
// If the candidate is an Articulate dynamic controller, set valid
59-
if (candidates[i].Endpoint.Metadata.GetMetadata<ArticulateDynamicRouteAttribute>() is not null)
59+
if (candidates[i].Endpoint?.Metadata?.GetMetadata<ArticulateDynamicRouteAttribute>() is not null)
6060
{
6161
candidates.SetValidity(i, true);
6262
}

0 commit comments

Comments
 (0)