This commit is contained in:
talksik
2022-05-20 08:58:51 -05:00
parent 1fec89d533
commit e47944f10b
@@ -134,11 +134,10 @@ export function StreamProvider({ children }: { children: React.ReactChild }) {
// find this person in peer map // find this person in peer map
updatePeerMap((draft) => { updatePeerMap((draft) => {
const localPeerForMasterAndMe = draft[res.lineId].find( const localPeerForMasterAndMe = draft[res.lineId]?.find(
(currPeerRelationship) => currPeerRelationship.userId === res.masterUserId, (currPeerRelationship) => currPeerRelationship.userId === res.masterUserId,
); );
// hacking little bug!
if (localPeerForMasterAndMe) localPeerForMasterAndMe.peer.signal(res.simplePeerSignal); if (localPeerForMasterAndMe) localPeerForMasterAndMe.peer.signal(res.simplePeerSignal);
}); });
}); });