1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 00:53:31 +08:00

Make use of existing null check

This commit is contained in:
Dean Herbert 2019-08-15 14:38:49 +09:00
parent 9e13a6aeae
commit 8f63887972

View File

@ -138,11 +138,11 @@ namespace osu.Game.Overlays.Profile.Header
private void tryAddInfo(IconUsage icon, string content, string link = null)
{
// newlines could be contained in API returned user content.
content = content?.Replace("\n", " ");
if (string.IsNullOrEmpty(content)) return;
// newlines could be contained in API returned user content.
content = content.Replace("\n", " ");
bottomLinkContainer.AddIcon(icon, text =>
{
text.Font = text.Font.With(size: 10);