Add guard checks to PageLoaderMatcherPolicy when loader returns asynchronously (#25370)

This commit is contained in:
Safia Abdalla 2020-08-31 17:16:36 +00:00 committed by GitHub
parent 21668d2c16
commit bb62621f37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -111,6 +111,11 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure
for (var i = index + 1; i < candidates.Count; i++)
{
if (!candidates.IsValidCandidate(i))
{
continue;
}
var candidate = candidates[i];
var endpoint = candidate.Endpoint;