From eb39bbd3ff514470a96dce1d5459527d005c9ae8 Mon Sep 17 00:00:00 2001 From: Dean Marcussen Date: Wed, 27 Feb 2019 18:52:21 +0000 Subject: [PATCH] Fix null error when BodyAspect is not populated (#3230) --- .../OrchardCore.Contents/Feeds/CommonFeedItemBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Feeds/CommonFeedItemBuilder.cs b/src/OrchardCore.Modules/OrchardCore.Contents/Feeds/CommonFeedItemBuilder.cs index 0649afd630a..9166cd2ca7b 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Feeds/CommonFeedItemBuilder.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Feeds/CommonFeedItemBuilder.cs @@ -46,7 +46,7 @@ public async Task PopulateAsync(FeedContext context) feedItem.Element.SetElementValue("title", contentItem.DisplayText); feedItem.Element.Add(link); - feedItem.Element.SetElementValue("description", bodyAspect.Body.ToString()); + feedItem.Element.SetElementValue("description", bodyAspect.Body?.ToString()); if (contentItem.PublishedUtc != null) {