fix: addPeers didnt re-define the variable

This commit is contained in:
Avraham Sakal
2023-05-18 12:56:57 -04:00
parent 0c7cb43536
commit 169e9de210
+1 -1
View File
@@ -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`: