Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(redux) fix not working with Redux Devtools

Saúl Ibarra Corretgé66153087e1c7
diff --git a/react/features/base/app/components/BaseApp.js b/react/features/base/app/components/BaseApp.js
index 5d09cd16d0..a88447c0cf 100644
--- a/react/features/base/app/components/BaseApp.js
+++ b/react/features/base/app/components/BaseApp.js
@@ -218,19 +218,9 @@ export default class BaseApp extends Component<*, State> {
// additional 3rd party middleware:
// - Thunk - allows us to dispatch async actions easily. For more info
// @see https://github.com/gaearon/redux-thunk.
- let middleware = MiddlewareRegistry.applyMiddleware(Thunk);
-
- // Try to enable Redux DevTools Chrome extension in order to make it
- // available for the purposes of facilitating development.
- let devToolsExtension;
-
- if (typeof window === 'object'
- && (devToolsExtension = window.devToolsExtension)) {
- middleware = compose(middleware, devToolsExtension());
- }
-
- const store = createStore(
- reducer, PersistenceRegistry.getPersistedState(), middleware);
+ const middleware = MiddlewareRegistry.applyMiddleware(Thunk);
+ const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
+ const store = createStore(reducer, PersistenceRegistry.getPersistedState(), composeEnhancers(middleware));
// StateListenerRegistry
StateListenerRegistry.subscribe(store);