From c087e900991a789ca4201222b6514cdea7438364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Wed, 31 Jan 2018 17:41:12 +0100 Subject: [PATCH] [RN] Fix setReceivedVideoQuality if we are not yet in a conference It may happen that such action is fired while joining. --- react/features/base/conference/middleware.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/react/features/base/conference/middleware.js b/react/features/base/conference/middleware.js index 934b15b58..4a3debfc2 100644 --- a/react/features/base/conference/middleware.js +++ b/react/features/base/conference/middleware.js @@ -320,9 +320,11 @@ function _setLastN(store, next, action) { function _setReceiveVideoQuality({ dispatch, getState }, next, action) { const { audioOnly, conference } = getState()['features/base/conference']; - conference.setReceiverVideoConstraint(action.receiveVideoQuality); - if (audioOnly) { - dispatch(toggleAudioOnly()); + if (conference) { + conference.setReceiverVideoConstraint(action.receiveVideoQuality); + if (audioOnly) { + dispatch(toggleAudioOnly()); + } } return next(action);