1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 17:52:56 +08:00

Use FirstOrDefault instead of First

This commit is contained in:
Andrei Zavatski 2021-05-09 09:12:37 +03:00
parent 8868439ce4
commit f0c1784d05

View File

@ -42,7 +42,7 @@ namespace osu.Game.Tests.Visual.Online
AddAssert("Show More button is hidden", () => showMoreButton?.Alpha == 0);
}
private ShowMoreButton showMoreButton => overlay.ChildrenOfType<ShowMoreButton>().First();
private ShowMoreButton showMoreButton => overlay.ChildrenOfType<ShowMoreButton>().FirstOrDefault();
private void setUpNewsResponse(GetNewsResponse r, string testName = "Set up response")
=> AddStep(testName, () =>