Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Commit

Permalink
Fixed bug with a dev tools and firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanko committed May 1, 2017
1 parent fbfaa3e commit 4200508
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions source/js/index.js
Expand Up @@ -29,11 +29,18 @@ if (isProduction) {
// In development mode beside thunk
// logger and DevTools are added
const middleware = applyMiddleware(thunk, logger);
const enhancer = compose(
middleware,
// Enable DevTools if browser extension is installed
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__() // eslint-disable-line
);
let enhancer;

// Enable DevTools if browser extension is installed
if (window.__REDUX_DEVTOOLS_EXTENSION__) { // eslint-disable-line
enhancer = compose(
middleware,
window.__REDUX_DEVTOOLS_EXTENSION__() // eslint-disable-line
);
} else {
enhancer = compose(middleware);
}


store = createStore(
rootReducer,
Expand Down

0 comments on commit 4200508

Please sign in to comment.