Skip to content

Commit

Permalink
[SQLLab] Fix the usage of Redux DevTools Enhancer (#1278)
Browse files Browse the repository at this point in the history
* Fix the usage of Redux DevTools Enhancer

* Fix ESLint error
  • Loading branch information
zalmoxisus authored and mistercrunch committed Oct 11, 2016
1 parent 1e6e144 commit 79460ab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions caravel/assets/javascripts/reduxUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ export function addToArr(state, arrKey, obj) {
export function enhancer() {
let enhancerWithPersistState = compose(persistState());
if (process.env.NODE_ENV === 'dev') {
enhancerWithPersistState = compose(
persistState(), window.devToolsExtension && window.devToolsExtension()
);
/* eslint-disable no-underscore-dangle */
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
/* eslint-enable */
enhancerWithPersistState = composeEnhancers(persistState());
}
return enhancerWithPersistState;
}

0 comments on commit 79460ab

Please sign in to comment.