Skip to content

Commit

Permalink
Merge pull request #2646 from phacks/fix-redux-devtools-warning
Browse files Browse the repository at this point in the history
[#2632] Fix deprecated Redux Dev Tools extension warning
  • Loading branch information
fzaninotto authored Dec 11, 2018
2 parents 057a1d3 + 3acd746 commit d81aede
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/CustomApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ export default ({
routerMiddleware(history),
// add your own middlewares here
),
typeof window !== 'undefined' && window.devToolsExtension
? window.devToolsExtension()
typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__
? window.__REDUX_DEVTOOLS_EXTENSION__()
: f => f
// add your own enhancers here
)
Expand Down
7 changes: 4 additions & 3 deletions packages/ra-core/src/createAdminStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { defaultI18nProvider } from './i18n';
import formMiddleware from './form/formMiddleware';

interface Window {
devToolsExtension?: () => () => void;
__REDUX_DEVTOOLS_EXTENSION__?: () => () => void;
}

export default ({
Expand Down Expand Up @@ -48,8 +48,9 @@ export default ({
formMiddleware,
routerMiddleware(history)
),
typeof typedWindow !== 'undefined' && typedWindow.devToolsExtension
? typedWindow.devToolsExtension()
typeof typedWindow !== 'undefined' &&
typedWindow.__REDUX_DEVTOOLS_EXTENSION__
? typedWindow.__REDUX_DEVTOOLS_EXTENSION__()
: f => f
)
);
Expand Down

0 comments on commit d81aede

Please sign in to comment.