mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-07-13 09:03:15 +01:00
Simplify a null check
This commit is contained in:
@@ -546,10 +546,8 @@ namespace Tgstation.Server.Host.Components
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(bridgeHandler);
|
||||
|
||||
var accessIdentifier = bridgeHandler.DMApiParameters.AccessIdentifier;
|
||||
if (accessIdentifier == null)
|
||||
throw new InvalidOperationException("Attempted bridge registration with null AccessIdentifier!");
|
||||
|
||||
var accessIdentifier = bridgeHandler.DMApiParameters.AccessIdentifier
|
||||
?? throw new InvalidOperationException("Attempted bridge registration with null AccessIdentifier!");
|
||||
lock (bridgeHandlers)
|
||||
{
|
||||
bridgeHandlers.Add(accessIdentifier, bridgeHandler);
|
||||
|
||||
Reference in New Issue
Block a user