fix(rn) add default value when retrieving e2ee redux state

This commit is contained in:
titus.moldovan 2021-09-23 17:26:44 +03:00 committed by Saúl Ibarra Corretgé
parent 19e7f07b32
commit 554e2eeb11
1 changed files with 1 additions and 1 deletions

View File

@ -337,7 +337,7 @@ StateListenerRegistry.register(
function _e2eeUpdated({ getState, dispatch }, conference, participantId, newValue) { function _e2eeUpdated({ getState, dispatch }, conference, participantId, newValue) {
const e2eeEnabled = newValue === 'true'; const e2eeEnabled = newValue === 'true';
const { maxMode } = getState()['features/e2ee']; const { maxMode } = getState()['features/e2ee'] || {};
if (maxMode !== MAX_MODE.THRESHOLD_EXCEEDED || !e2eeEnabled) { if (maxMode !== MAX_MODE.THRESHOLD_EXCEEDED || !e2eeEnabled) {
dispatch(toggleE2EE(e2eeEnabled)); dispatch(toggleE2EE(e2eeEnabled));