Fix NullReferenceException

This commit is contained in:
Jordan Brown
2018-10-13 09:39:20 -04:00
parent 790038bcd6
commit ae0136ab46
+1 -1
View File
@@ -57,7 +57,7 @@ namespace Tgstation.Server.Client
public ServerClient(IApiClient apiClient, Token token)
{
this.apiClient = apiClient ?? throw new ArgumentNullException(nameof(apiClient));
token = token ?? throw new ArgumentNullException(nameof(token));
this.token = token ?? throw new ArgumentNullException(nameof(token));
if (Token.Bearer != apiClient.Headers.Token)
throw new ArgumentOutOfRangeException(nameof(token), token, "Provided token does not match apiClient headers!");