mirror of
https://github.com/apache/superset.git
synced 2026-04-18 15:44:57 +00:00
Do not use persistState for explorev2 (#1894)
* Do not use persistState for explorev2 * Change enhancerWithPersistState to enhancer and function name to initEnhancer
This commit is contained in:
@@ -64,15 +64,15 @@ export function addToArr(state, arrKey, obj) {
|
||||
return Object.assign({}, state, newState);
|
||||
}
|
||||
|
||||
export function enhancer() {
|
||||
let enhancerWithPersistState = compose(persistState());
|
||||
export function initEnhancer(persist = true) {
|
||||
let enhancer = persist ? compose(persistState()) : compose();
|
||||
if (process.env.NODE_ENV === 'dev') {
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
|
||||
/* eslint-enable */
|
||||
enhancerWithPersistState = composeEnhancers(persistState());
|
||||
enhancer = persist ? composeEnhancers(persistState()) : composeEnhancers();
|
||||
}
|
||||
return enhancerWithPersistState;
|
||||
return enhancer;
|
||||
}
|
||||
|
||||
export function areArraysShallowEqual(arr1, arr2) {
|
||||
|
||||
Reference in New Issue
Block a user