Improve getServer method

This commit is contained in:
Guilherme Werner
2024-01-09 17:52:14 -03:00
parent 42a4c6e6d3
commit a34150e8f1
2 changed files with 2 additions and 2 deletions

View File

@ -261,7 +261,7 @@ export class TribufuApi {
* @returns Server | null
*/
public async getServer(idOrAddress: string): Promise<any> {
if (isNaN(idOrAddress as any)) {
if (/[.:]/.test(idOrAddress)) {
return await this.getServerByAddress(idOrAddress);
}