Skip to content

Commit

Permalink
Fix NRE in ContentTypeSitemapSourceDriver (#16709)
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamco authored Sep 12, 2024
1 parent 33af00a commit 0537128
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public override async Task<IDisplayResult> EditAsync(ContentTypesSitemapSource s
model.ChangeFrequency = sitemapSource.ChangeFrequency;
model.ContentTypes = entries;
model.LimitedContentTypes = limitedEntries;
model.LimitedContentType = limitedCtd != null ? limitedCtd.Name : contentTypeDefinitions.FirstOrDefault().Name;
model.LimitedContentType = limitedCtd is null ? contentTypeDefinitions.FirstOrDefault()?.Name : limitedCtd.Name;
model.SitemapSource = sitemapSource;
}).Location("Content");
}
Expand Down

0 comments on commit 0537128

Please sign in to comment.