fix: rename devToolsExtension (#2192)

Note that starting from v2.7, window.devToolsExtension was renamed to window.__REDUX_DEVTOOLS_EXTENSION__ / window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__.
This commit is contained in:
Steven
2019-02-12 17:12:29 +01:00
committed by Kiwi
parent 1928a7b02e
commit 657bf388cf
+2 -2
View File
@@ -14,9 +14,9 @@ import {
export function createStore(reducers, middlewares = []) {
const enhancers = [applyMiddleware(...middlewares)];
if (window.devToolsExtension) {
if (window.__REDUX_DEVTOOLS_EXTENSION__) {
// we can't have the last argument of compose() be undefined
enhancers.push(window.devToolsExtension());
enhancers.push(window.__REDUX_DEVTOOLS_EXTENSION__());
}
return reduxCreateStore(combineReducers(reducers), {}, compose(...enhancers));