1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 16:37:26 +08:00

Mark Converts as nullable

This commit is contained in:
Joseph Madamba 2023-01-15 12:46:41 -08:00
parent e7ab543799
commit 85c1932851
2 changed files with 2 additions and 2 deletions

View File

@ -126,7 +126,7 @@ namespace osu.Game.Online.API.Requests.Responses
public APIBeatmap[] Beatmaps { get; set; } = Array.Empty<APIBeatmap>(); public APIBeatmap[] Beatmaps { get; set; } = Array.Empty<APIBeatmap>();
[JsonProperty(@"converts")] [JsonProperty(@"converts")]
public APIBeatmap[] Converts { get; set; } = Array.Empty<APIBeatmap>(); public APIBeatmap[]? Converts { get; set; }
private BeatmapMetadata metadata => new BeatmapMetadata private BeatmapMetadata metadata => new BeatmapMetadata
{ {

View File

@ -168,7 +168,7 @@ namespace osu.Game.Overlays.BeatmapSet
if (BeatmapSet != null) if (BeatmapSet != null)
{ {
Difficulties.ChildrenEnumerable = BeatmapSet.Beatmaps.Concat(BeatmapSet.Converts) Difficulties.ChildrenEnumerable = BeatmapSet.Beatmaps.Concat(BeatmapSet.Converts ?? Array.Empty<APIBeatmap>())
.Where(b => b.Ruleset.MatchesOnlineID(ruleset.Value)) .Where(b => b.Ruleset.MatchesOnlineID(ruleset.Value))
.OrderBy(b => !b.Convert) .OrderBy(b => !b.Convert)
.ThenBy(b => b.StarRating) .ThenBy(b => b.StarRating)