use nullorempty

This commit is contained in:
Stanley Dimant
2024-12-17 17:02:57 +01:00
parent dbf4a90df2
commit 4650893599
4 changed files with 7 additions and 7 deletions

View File

@@ -196,7 +196,7 @@ public class ServerConfigurationManager
public string GetDiscordUserFromToken(ServerStorage server)
{
JwtSecurityTokenHandler handler = new JwtSecurityTokenHandler();
if (server.OAuthToken == null) return string.Empty;
if (string.IsNullOrEmpty(server.OAuthToken)) return string.Empty;
try
{
var token = handler.ReadJwtToken(server.OAuthToken);