mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-20 16:28:14 +00:00
fix(features/notifications): crash on undefined participant
This commit is contained in:
@@ -84,9 +84,10 @@ MiddlewareRegistry.register(store => next => action => {
|
||||
|
||||
const { id, role } = action.participant;
|
||||
const state = store.getState();
|
||||
const { role: oldRole } = getParticipantById(state, id);
|
||||
const oldParticipant = getParticipantById(state, id);
|
||||
const oldRole = oldParticipant?.role;
|
||||
|
||||
if (oldRole !== role && role === PARTICIPANT_ROLE.MODERATOR) {
|
||||
if (oldRole && oldRole !== role && role === PARTICIPANT_ROLE.MODERATOR) {
|
||||
const displayName = getParticipantDisplayName(state, id);
|
||||
|
||||
store.dispatch(showNotification({
|
||||
|
||||
Reference in New Issue
Block a user