diff --git a/src/Server/AllServers.ts b/src/Server/AllServers.ts index 42a8b6150..47355e557 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); }