When we have empty login, api.Token becames empty

So we can't sign in having Token without login
This commit is contained in:
Andrey Zavadskiy 2016-12-22 16:09:42 +03:00
parent 4817d4bf10
commit 7c96102229

View File

@ -68,7 +68,7 @@ namespace osu.Game
Dependencies.Cache(API = new APIAccess
{
Username = Config.Get<string>(OsuConfig.Username),
Token = Config.Get<string>(OsuConfig.Token)
Token = string.IsNullOrEmpty(Config.Get<string>(OsuConfig.Username)) ? string.Empty : Config.Get<string>(OsuConfig.Token)
});
API.Register(this);