diff --git a/src/index.ts b/src/index.ts index a875e04..e366e88 100644 --- a/src/index.ts +++ b/src/index.ts @@ -261,7 +261,7 @@ export function addPeers(self:Interpreter_T, name:string, peers:Ar if(!self.peers.hasOwnProperty(name)){ self.peers[name] = []; } - (self.peers[name] as Array>).concat(peers); + self.peers[name] = (self.peers[name] as Array>).concat(peers); peers.forEach((peer)=>{ const subscriptionId = subscribeToEvents(peer, (e, peer)=>{ // TODO: ensure there's no faulty logic in having this `if`: