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

Check for null/empty instead

This commit is contained in:
Dean Herbert 2021-11-03 04:09:31 +09:00
parent 8d0b32981f
commit 51e92e1b2d

View File

@ -107,7 +107,7 @@ namespace osu.Game.Online.API
WebRequest = CreateWebRequest();
WebRequest.Failed += Fail;
WebRequest.AllowRetryOnTimeout = false;
if (API.IsLoggedIn)
if (!string.IsNullOrEmpty(API.AccessToken))
WebRequest.AddHeader("Authorization", $"Bearer {API.AccessToken}");
if (isFailing) return;