diff --git a/app/lib/index.jsx b/app/lib/index.jsx index dbd91c4..e4f9cd2 100644 --- a/app/lib/index.jsx +++ b/app/lib/index.jsx @@ -5,7 +5,8 @@ import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { applyMiddleware as applyReduxMiddleware, - createStore as createReduxStore + createStore as createReduxStore, + compose as composeRedux } from 'redux'; import thunk from 'redux-thunk'; import { createLogger as createReduxLogger } from 'redux-logger'; @@ -40,10 +41,22 @@ if (process.env.NODE_ENV === 'development') reduxMiddlewares.push(reduxLogger); } +const composeEnhancers = +typeof window === 'object' && +window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? + window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ + // Specify extension’s options like name, actionsBlacklist, actionsCreators, serialize... + }) : composeRedux; + +const enhancer = composeEnhancers( + applyReduxMiddleware(...reduxMiddlewares) + // other store enhancers if any +); + const store = createReduxStore( reducers, undefined, - applyReduxMiddleware(...reduxMiddlewares) + enhancer ); domready(() => diff --git a/server/lib/Room.js b/server/lib/Room.js index a2bad3f..e1ded90 100644 --- a/server/lib/Room.js +++ b/server/lib/Room.js @@ -254,7 +254,7 @@ class Room extends EventEmitter protooPeer.send( 'chat-history-receive', - { chatHistory : this._chatHistory } + { chatHistory: this._chatHistory } ); break;