diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Sitemaps/ContentTypesSitemapSourceDriver.cs b/src/OrchardCore.Modules/OrchardCore.Contents/Sitemaps/ContentTypesSitemapSourceDriver.cs index 8e435eb5fc0..88de84d0ec4 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Sitemaps/ContentTypesSitemapSourceDriver.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Sitemaps/ContentTypesSitemapSourceDriver.cs @@ -67,7 +67,7 @@ public override async Task 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"); }