From 79460abdd230b2d53a9f2da15ac5160ba6db400b Mon Sep 17 00:00:00 2001 From: Mihail Diordiev Date: Wed, 12 Oct 2016 01:27:25 +0300 Subject: [PATCH] [SQLLab] Fix the usage of Redux DevTools Enhancer (#1278) * Fix the usage of Redux DevTools Enhancer * Fix ESLint error --- caravel/assets/javascripts/reduxUtils.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/caravel/assets/javascripts/reduxUtils.js b/caravel/assets/javascripts/reduxUtils.js index e247d0b9e81fc..fda1c8de3c986 100644 --- a/caravel/assets/javascripts/reduxUtils.js +++ b/caravel/assets/javascripts/reduxUtils.js @@ -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; }