diff --git a/react/features/filmstrip/middleware.js b/react/features/filmstrip/middleware.js index d9d90e655..132776a70 100644 --- a/react/features/filmstrip/middleware.js +++ b/react/features/filmstrip/middleware.js @@ -17,7 +17,7 @@ declare var APP: Object; MiddlewareRegistry.register(({ getState }) => next => action => { switch (action.type) { case SET_CALL_OVERLAY_VISIBLE: - if (typeof APP === 'undefined') { + if (typeof APP !== 'undefined') { const oldValue = Boolean(getState()['features/jwt'].callOverlayVisible); const result = next(action); @@ -25,7 +25,14 @@ MiddlewareRegistry.register(({ getState }) => next => action => { = Boolean(getState()['features/jwt'].callOverlayVisible); oldValue === newValue - || Filmstrip.toggleFilmstrip(!newValue, false); + + // FIXME The following accesses the private state filmstrip of + // Filmstrip. It is written with the understanding that + // Filmstrip will be rewritten in React and, consequently, will + // not need the middleware implemented here, Filmstrip.init, and + // UI.start. + || (Filmstrip.filmstrip + && Filmstrip.toggleFilmstrip(!newValue, false)); return result; }