From a07e17a31f80048616bf8f32e3edc41d12ae03c4 Mon Sep 17 00:00:00 2001 From: Kimberlee Johnson Date: Tue, 11 Jan 2022 14:25:30 -0800 Subject: [PATCH] Shortened return statement for currentSpeaker memo --- custom/shared/contexts/ParticipantsProvider.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/custom/shared/contexts/ParticipantsProvider.js b/custom/shared/contexts/ParticipantsProvider.js index 64843f6..50db416 100644 --- a/custom/shared/contexts/ParticipantsProvider.js +++ b/custom/shared/contexts/ParticipantsProvider.js @@ -140,11 +140,7 @@ export const ParticipantsProvider = ({ children }) => { const lastActiveSpeaker = sorted?.[0]; - if (lastActiveSpeaker) { - return lastActiveSpeaker; - } - - return localParticipant; + return lastActiveSpeaker || localParticipant; }, [activeParticipant, localParticipant, participants]); /**