fix: Adds undefined check to avoid error.

Was breaking DisableSelfViewTest.
This commit is contained in:
Дамян Минков 2022-04-06 08:35:18 -05:00
parent 42703fed47
commit 6687c3f4ab
1 changed files with 4 additions and 2 deletions

View File

@ -106,8 +106,10 @@ MiddlewareRegistry.register(store => next => action => {
store.dispatch(removeStageParticipant(local.id));
}
if (activeParticipantsIds.find(id => id === localScreenShare.id)) {
store.dispatch(removeStageParticipant(localScreenShare.id));
if (localScreenShare) {
if (activeParticipantsIds.find(id => id === localScreenShare.id)) {
store.dispatch(removeStageParticipant(localScreenShare.id));
}
}
}
break;