fix: addPeers didnt re-define the variable

main
Avraham Sakal 2 years ago
parent 0c7cb43536
commit 169e9de210

@ -261,7 +261,7 @@ export function addPeers<C, C_Peer>(self:Interpreter_T<C>, name:string, peers:Ar
if(!self.peers.hasOwnProperty(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)=>{
const subscriptionId = subscribeToEvents(peer, (e, peer)=>{
// TODO: ensure there's no faulty logic in having this `if`:

Loading…
Cancel
Save