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:
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tribufu",
|
"name": "tribufu",
|
||||||
"version": "0.1.6",
|
"version": "0.1.7",
|
||||||
"description": "Tribufu JS SDK",
|
"description": "Tribufu JS SDK",
|
||||||
"repository": "https://github.com/Tribufu/TribufuJs",
|
"repository": "https://github.com/Tribufu/TribufuJs",
|
||||||
"author": "Tribufu <contact@Tribufu.com>",
|
"author": "Tribufu <contact@Tribufu.com>",
|
||||||
|
@ -261,7 +261,7 @@ export class TribufuApi {
|
|||||||
* @returns Server | null
|
* @returns Server | null
|
||||||
*/
|
*/
|
||||||
public async getServer(idOrAddress: string): Promise<any> {
|
public async getServer(idOrAddress: string): Promise<any> {
|
||||||
if (isNaN(idOrAddress as any)) {
|
if (/[.:]/.test(idOrAddress)) {
|
||||||
return await this.getServerByAddress(idOrAddress);
|
return await this.getServerByAddress(idOrAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user