Browse Source

Fixed if the content is null the issue

pull/13737/head
malik masis 4 years ago
parent
commit
2630928284
  1. 4
      modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentParser.cs

4
modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentParser.cs

@ -20,11 +20,11 @@ public class ContentParser : ITransientDependency
public Task<List<ContentFragment>> ParseAsync(string content)
{
if (!_options.WidgetConfigs.Any())
if (!_options.WidgetConfigs.Any() || content is null)
{
return Task.FromResult(new List<ContentFragment>
{
new ContentFragment { Type = Markdown }.SetProperty(Content, content),
new ContentFragment { Type = Markdown }.SetProperty(Content, content ?? string.Empty),
});
}

Loading…
Cancel
Save