Skip to content

Commit 0eed8e4

Browse files
author
Collin K. Cusce
committed
fixing the fact numbers cant be keys
1 parent cd8654c commit 0eed8e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ export class Slopes extends SlopesCore {
6363
constructor(ip:string, port:number, protocol:string = "http", networkID:number = 2, avmChainID:string = undefined, skipinit:boolean = false) {
6464
super(ip, port, protocol);
6565
let chainid = avmChainID;
66-
if(typeof avmChainID === 'undefined' || !avmChainID || (typeof avmChainID === "string" && avmChainID.toLowerCase() == "avm")){
67-
if(networkID in Defaults.network){
66+
if(typeof avmChainID === 'undefined' || !avmChainID || avmChainID.toLowerCase() == "avm"){
67+
if(networkID.toString() in Defaults.network){
6868
chainid = Defaults.network[networkID]["avm"].blockchainID
6969
} else {
7070
chainid = "HD8HEwNKTXRBcVUqvQW2LRu9izqej91xzGmXATF4KMMV6LLm7";

0 commit comments

Comments
 (0)