1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 14:02:55 +08:00

Switch back to FirstOrDefault to allow for weird testing logic to pass

This commit is contained in:
Dean Herbert 2021-01-03 16:46:24 +09:00
parent 29dbb1cc0d
commit 99fa0e25dc

View File

@ -41,7 +41,7 @@ namespace osu.Game.Online.API
public Mod ToMod(Ruleset ruleset)
{
Mod resultMod = ruleset.GetAllMods().SingleOrDefault(m => m.Acronym == Acronym);
Mod resultMod = ruleset.GetAllMods().FirstOrDefault(m => m.Acronym == Acronym);
if (resultMod == null)
throw new InvalidOperationException($"There is no mod in the ruleset ({ruleset.ShortName}) matching the acronym {Acronym}.");