Fix Redux DevTools deprecation warning (#5231). Fix #5214

This commit is contained in:
Deniz Dogan 2019-04-23 16:02:53 +02:00 committed by Thibaud Colas
parent 56fde49187
commit 647f2c1d1d
3 changed files with 6 additions and 1 deletions

View file

@ -11,5 +11,9 @@
"config": "client/webpack/prod.config.js" "config": "client/webpack/prod.config.js"
} }
} }
},
"rules": {
"no-underscore-dangle": ["error", { "allow": ["__REDUX_DEVTOOLS_EXTENSION__"] }]
} }
} }

View file

@ -364,6 +364,7 @@ Contributors
* Cassidy Brooke * Cassidy Brooke
* dthompson86 * dthompson86
* Jason Dilworth * Jason Dilworth
* Deniz Dogan
Translators Translators
=========== ===========

View file

@ -31,7 +31,7 @@ const initExplorer = (explorerNode, toggleNode) => {
const store = createStore(rootReducer, {}, compose( const store = createStore(rootReducer, {}, compose(
applyMiddleware(...middleware), applyMiddleware(...middleware),
// Expose store to Redux DevTools extension. // Expose store to Redux DevTools extension.
window.devToolsExtension ? window.devToolsExtension() : func => func window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() : func => func
)); ));
const startPage = parseInt(toggleNode.getAttribute('data-explorer-start-page'), 10); const startPage = parseInt(toggleNode.getAttribute('data-explorer-start-page'), 10);