Shortened return statement for currentSpeaker memo

This commit is contained in:
Kimberlee Johnson 2022-01-11 14:25:30 -08:00
parent 63c4d253a2
commit a07e17a31f
1 changed files with 1 additions and 5 deletions

View File

@ -140,11 +140,7 @@ export const ParticipantsProvider = ({ children }) => {
const lastActiveSpeaker = sorted?.[0];
if (lastActiveSpeaker) {
return lastActiveSpeaker;
}
return localParticipant;
return lastActiveSpeaker || localParticipant;
}, [activeParticipant, localParticipant, participants]);
/**