Skip to content

Commit fc605c8

Browse files
author
Ives van Hoorne
committed
Only allow chrome extension when development mode
1 parent 69537a0 commit fc605c8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/app/store/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,16 @@ import { createStore, applyMiddleware, compose } from 'redux';
44
import thunk from './services/thunk-middleware';
55
import rootReducer from './reducers';
66

7+
function getComposeEnhancers() {
8+
// eslint-disable-next-line
9+
if (process.env.NODE_ENV !== 'production' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) {
10+
return window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__; // eslint-disable-line
11+
}
12+
return compose;
13+
}
14+
715
export default () => {
8-
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; // eslint-disable-line
16+
const composeEnhancers = getComposeEnhancers();
917
const store = createStore(
1018
rootReducer,
1119
composeEnhancers(applyMiddleware(

0 commit comments

Comments
 (0)