Skip to content

Commit

Permalink
[Maps] Fix issue preventing WebGL warning message from appearing (#91069
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Aaron Caldwell authored Feb 18, 2021
1 parent 18db413 commit df8f2b1
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions x-pack/plugins/maps/public/reducers/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import thunk from 'redux-thunk';
import { ui, DEFAULT_MAP_UI_STATE } from './ui';
import { map, DEFAULT_MAP_STATE } from './map'; // eslint-disable-line import/named
import { nonSerializableInstances } from './non_serializable_instances';
import { MAP_DESTROYED } from '../actions';

export const DEFAULT_MAP_STORE_STATE = {
ui: { ...DEFAULT_MAP_UI_STATE },
Expand All @@ -26,16 +25,7 @@ export function createMapStore() {
nonSerializableInstances,
});

const rootReducer = (state, action) => {
// Reset store on map destroyed
if (action.type === MAP_DESTROYED) {
state = undefined;
}

return combinedReducers(state, action);
};

const storeConfig = {};
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
return createStore(rootReducer, storeConfig, composeEnhancers(...enhancers));
return createStore(combinedReducers, storeConfig, composeEnhancers(...enhancers));
}

0 comments on commit df8f2b1

Please sign in to comment.