From 2630928284aca9da163ae64c7676812851de94b6 Mon Sep 17 00:00:00 2001 From: malik masis Date: Thu, 18 Aug 2022 14:04:39 +0300 Subject: [PATCH] Fixed if the content is null the issue --- .../Volo/CmsKit/Contents/ContentParser.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentParser.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentParser.cs index 7fe9fe5b60..617e7d61cc 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentParser.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentParser.cs @@ -20,11 +20,11 @@ public class ContentParser : ITransientDependency public Task> ParseAsync(string content) { - if (!_options.WidgetConfigs.Any()) + if (!_options.WidgetConfigs.Any() || content is null) { return Task.FromResult(new List { - new ContentFragment { Type = Markdown }.SetProperty(Content, content), + new ContentFragment { Type = Markdown }.SetProperty(Content, content ?? string.Empty), }); }