mirror of
https://github.com/tribufu/tribufu-js
synced 2026-06-01 09:42:36 +00:00
Improve getServer method
This commit is contained in:
parent
42a4c6e6d3
commit
a34150e8f1
2 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue