diff --git a/src/Moonglade.Web/Pages/Components/CommentList/Default.cshtml b/src/Moonglade.Web/Pages/Components/CommentList/Default.cshtml index 7924061f9..ceb0cf53f 100644 --- a/src/Moonglade.Web/Pages/Components/CommentList/Default.cshtml +++ b/src/Moonglade.Web/Pages/Components/CommentList/Default.cshtml @@ -9,7 +9,7 @@ return "N/A"; } - var sets = username.Split(' '); + var sets = username.Split(' ').Where(t => !string.IsNullOrWhiteSpace(t)).ToArray(); if (sets.Length == 1) { return sets[0].First().ToString().ToUpper(); @@ -83,4 +83,4 @@ else
@SharedLocalizer["No Comments"]
-} \ No newline at end of file +}