Skip to content

Commit

Permalink
Fix possible NREs in SeoMetaSettingsHandler (#16311)
Browse files Browse the repository at this point in the history
  • Loading branch information
gvkries committed Jun 13, 2024
1 parent b5bdf91 commit 5aa5c70
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public override Task GetContentItemAspectAsync(ContentItemAspectContext context)
if (string.IsNullOrEmpty(aspect.OpenGraphSiteName))
{
aspect.OpenGraphSiteName = metaSettings.Content.SocialMetaSettings?.OpenGraphSiteName?.Text.ToString();
aspect.OpenGraphSiteName = metaSettings.Content.SocialMetaSettings?.OpenGraphSiteName?.Text?.ToString();
if (string.IsNullOrEmpty(aspect.OpenGraphSiteName))
{
aspect.OpenGraphSiteName = siteSettings.SiteName;
Expand All @@ -114,7 +114,7 @@ public override Task GetContentItemAspectAsync(ContentItemAspectContext context)
if (string.IsNullOrEmpty(aspect.OpenGraphAppId))
{
aspect.OpenGraphAppId = metaSettings.Content.SocialMetaSettings?.OpenGraphAppId?.Text.ToString();
aspect.OpenGraphAppId = metaSettings.Content.SocialMetaSettings?.OpenGraphAppId?.Text?.ToString();
}
if (string.IsNullOrEmpty(aspect.OpenGraphImage))
Expand Down

0 comments on commit 5aa5c70

Please sign in to comment.