Skip to content

Commit c3a420e

Browse files
committed
gud
1 parent 08371d0 commit c3a420e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hooks/usePeer/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export function useHostMultiPeerSession<HostState, PeerState>(
119119
});
120120
conn.on('disconnected', (id: string) => {
121121
setPeerStates((prev: PeerDataPairWithConn<PeerState>[]) => {
122-
return prev.filter((state) => state.conn !== conn.peer && state.id !== myID);
122+
return prev.filter((state) => state.conn !== id && state.id !== myID && state.id !== id);
123123
});
124124
});
125125

0 commit comments

Comments
 (0)