Skip to content

Commit c45ad30

Browse files
committed
Try again to fix calParticipants
1 parent e06d76e commit c45ad30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hooks/useCall.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ export const useConnectionState = (call: Call | null): ConnectionState =>
4242
);
4343

4444
export const useParticipants = (call: Call | null): Map<RoomMember, Set<string>> => {
45+
const participants = call?.participants;
4546
return useTypedEventEmitterState(
4647
call ?? undefined,
4748
CallEvent.Participants,
48-
useCallback((state) => state ?? call?.participants ?? new Map(), [call]),
49+
useCallback((state) => state ?? participants ?? new Map(), [participants]),
4950
);
5051
};
5152

0 commit comments

Comments
 (0)