Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Fix a possible undefined state usage
Lyubomir Marinov183d3c3ca4ac
diff --git a/react/features/background/middleware.js b/react/features/background/middleware.jsindex 07e374ec2f..debdbd09af 100644--- a/react/features/background/middleware.js+++ b/react/features/background/middleware.js@@ -33,10 +33,10 @@ import { MiddlewareRegistry } from '../base/redux';MiddlewareRegistry.register(store => next => action => {switch (action.type) {case _SET_APP_STATE_LISTENER: {- const bgState = store.getState()['features/background'];+ const { appStateListener } = store.getState()['features/background'];- if (bgState.appStateListener) {- AppState.removeEventListener('change', bgState.listener);+ if (appStateListener) {+ AppState.removeEventListener('change', appStateListener);}if (action.listener) {AppState.addEventListener('change', action.listener);