mirror of
https://github.com/tribufu/sdk-js
synced 2025-06-16 18:44:18 +00:00
Improve getServer method
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user