<commit_before>import { createStore, applyMiddleware, compose } from 'redux';
import { autoRehydrate } from 'redux-persist';
import { routerMiddleware } from 'react-router-redux';
import { browserHistory } from 'react-router';
import thunkMiddleware from 'redux-thunk';

import rootReducer from './shared/reducers';

export default function configureStore(initialState) {
  const windowIfDefined = typeof window === 'undefined' ? null : window;

  /* devcode:start */
  const devToolsExtension = windowIfDefined && windowIfDefined.devToolsExtension;
  /* devcode:end */

  const enhancer = compose(
    applyMiddleware(thunkMiddleware, routerMiddleware(browserHistory)),
    devToolsExtension ? devToolsExtension() : f => f,
    autoRehydrate()
  );

  const store = createStore(rootReducer, initialState, enhancer);

  if (module.hot) {
    // Enable Webpack hot module replacement for reducers
    module.hot.accept('./shared/reducers', () => {
      store.replaceReducer(rootReducer);
    });
  }
<commit_msg>Fixed production bug in chrome<commit_after>import { createStore, applyMiddleware, compose } from 'redux';
import { autoRehydrate } from 'redux-persist';
import { routerMiddleware } from 'react-router-redux';
import { browserHistory } from 'react-router';
import thunkMiddleware from 'redux-thunk';

import rootReducer from './shared/reducers';

export default function configureStore(initialState) {
  const windowIfDefined = typeof window === 'undefined' ? null : window;

  /* devcode:start */
  const devToolsExtension = windowIfDefined && windowIfDefined.devToolsExtension;
  /* devcode:end */

  const enhancer = compose(
    applyMiddleware(thunkMiddleware, routerMiddleware(browserHistory)),
    typeof devToolsExtension !== undefined ? devToolsExtension() : f => f,
    autoRehydrate()
  );

  const store = createStore(rootReducer, initialState, enhancer);

  if (module.hot) {
    // Enable Webpack hot module replacement for reducers
    module.hot.accept('./shared/reducers', () => {
      store.replaceReducer(rootReducer);
    });
  }

{'fraction_non_alphanumeric': 0.11687681862269642, 'fraction_numerical': 0.0, 'mean_word_length': 4.698895027624309, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4414479', 'n_tokens_mistral': 601, 'n_tokens_neox': 579, 'n_words': 144}