懒得勤快 2 months ago
parent
commit
00a6bf3b67
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Masuit.MyBlogs.Core/Configs/Mappers/PostMapper.cs

+ 1 - 1
src/Masuit.MyBlogs.Core/Configs/Mappers/PostMapper.cs

@@ -49,7 +49,7 @@ public static partial class PostMapper
 
     public static RegionLimitMode MapLimitMode(RegionLimitMode? limitMode) => limitMode ?? RegionLimitMode.All;
 
-    public static string MapCategoryName(Category category) => category.Name;
+    public static string MapCategoryName(Category category) => category?.Name;
 
     public static int MapCommentCount(ICollection<Comment> comments) => comments.Count;