fix: addPeers didnt re-define the variable
This commit is contained in:
+1
-1
@@ -261,7 +261,7 @@ export function addPeers<C, C_Peer>(self:Interpreter_T<C>, name:string, peers:Ar
|
|||||||
if(!self.peers.hasOwnProperty(name)){
|
if(!self.peers.hasOwnProperty(name)){
|
||||||
self.peers[name] = [];
|
self.peers[name] = [];
|
||||||
}
|
}
|
||||||
(self.peers[name] as Array<Interpreter_T<C_Peer>>).concat(peers);
|
self.peers[name] = (self.peers[name] as Array<Interpreter_T<C_Peer>>).concat(peers);
|
||||||
peers.forEach((peer)=>{
|
peers.forEach((peer)=>{
|
||||||
const subscriptionId = subscribeToEvents(peer, (e, peer)=>{
|
const subscriptionId = subscribeToEvents(peer, (e, peer)=>{
|
||||||
// TODO: ensure there's no faulty logic in having this `if`:
|
// TODO: ensure there's no faulty logic in having this `if`:
|
||||||
|
|||||||
Reference in New Issue
Block a user