diff --git a/src/Server/AllServers.ts b/src/Server/AllServers.ts index baf2d6ac0..2fc994d65 100644 --- a/src/Server/AllServers.ts +++ b/src/Server/AllServers.ts @@ -42,8 +42,11 @@ function GetServerByHostname(hostname: string): BaseServer | null { //Get server by IP or hostname. Returns null if invalid export function GetServer(s: string): BaseServer | null { - const server = AllServers[s]; - if (server) return server; + if (AllServers.hasOwnProperty(s)) { + const server = AllServers[s]; + if (server) return server; + } + if (!isValidIPAddress(s)) { return GetServerByHostname(s); }