Shortened return statement for currentSpeaker memo
This commit is contained in:
parent
63c4d253a2
commit
a07e17a31f
|
|
@ -140,11 +140,7 @@ export const ParticipantsProvider = ({ children }) => {
|
|||
|
||||
const lastActiveSpeaker = sorted?.[0];
|
||||
|
||||
if (lastActiveSpeaker) {
|
||||
return lastActiveSpeaker;
|
||||
}
|
||||
|
||||
return localParticipant;
|
||||
return lastActiveSpeaker || localParticipant;
|
||||
}, [activeParticipant, localParticipant, participants]);
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue