Ver Fonte

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

Deniz Dogan há 6 anos atrás
pai
commit
647f2c1d1d
3 ficheiros alterados com 6 adições e 1 exclusões
  1. 4 0
      .eslintrc
  2. 1 0
      CONTRIBUTORS.rst
  3. 1 1
      client/src/components/Explorer/index.js

+ 4 - 0
.eslintrc

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

+ 1 - 0
CONTRIBUTORS.rst

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

+ 1 - 1
client/src/components/Explorer/index.js

@@ -31,7 +31,7 @@ const initExplorer = (explorerNode, toggleNode) => {
   const store = createStore(rootReducer, {}, compose(
     applyMiddleware(...middleware),
     // 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);