handle when no one has redux devtools

This commit is contained in:
Harmony
2019-10-25 13:07:41 -04:00
parent 3f01282bcc
commit 406a89db39

View File

@@ -1,13 +1,14 @@
import { createStore, applyMiddleware, compose } from "redux";
import thunk from "redux-thunk";
import rootReducer from "../reducers/main.js";
const devTools = window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__();
export default function setupStore() {
return createStore(
rootReducer,
compose(
applyMiddleware(thunk),
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
(devTools || function(f) { return f; })
)
);
}