Fix incorrect no posts handling and add corresponding test

This commit is contained in:
Andrei Zavatski
2021-05-11 20:52:11 +03:00
parent 822d99e69f
commit b0297c6324
2 changed files with 28 additions and 2 deletions

View File

@ -78,7 +78,7 @@ namespace osu.Game.Overlays.News.Sidebar
var allPosts = metadata.NewValue.NewsPosts;
if (!allPosts?.Any() ?? false)
if (!allPosts?.Any() ?? true)
return;
var lookup = metadata.NewValue.NewsPosts.ToLookup(post => post.PublishedAt.Month);