mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:42:54 +08:00
Change loose api ordering requirement to throw instead
This commit is contained in:
parent
269a8df0ec
commit
708b57348d
@ -50,8 +50,11 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
set
|
||||
{
|
||||
// in the deserialisation case we need to ferry this data across.
|
||||
if (Beatmap is APIBeatmap apiBeatmap)
|
||||
apiBeatmap.BeatmapSet = value;
|
||||
// the order of properties returned by the API guarantees that the beatmap is populated by this point.
|
||||
if (!(Beatmap is APIBeatmap apiBeatmap))
|
||||
throw new InvalidOperationException("Beatmap set metadata arrived before beatmap metadata in response");
|
||||
|
||||
apiBeatmap.BeatmapSet = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user