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];
|
const lastActiveSpeaker = sorted?.[0];
|
||||||
|
|
||||||
if (lastActiveSpeaker) {
|
return lastActiveSpeaker || localParticipant;
|
||||||
return lastActiveSpeaker;
|
|
||||||
}
|
|
||||||
|
|
||||||
return localParticipant;
|
|
||||||
}, [activeParticipant, localParticipant, participants]);
|
}, [activeParticipant, localParticipant, participants]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue