From 51e92e1b2d71d9d02c9edc8974c842c9894f1507 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 3 Nov 2021 04:09:31 +0900 Subject: [PATCH] Check for null/empty instead --- osu.Game/Online/API/APIRequest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Online/API/APIRequest.cs b/osu.Game/Online/API/APIRequest.cs index eea448fee3..69d72226ba 100644 --- a/osu.Game/Online/API/APIRequest.cs +++ b/osu.Game/Online/API/APIRequest.cs @@ -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;