libraries/common/store/index.js
function getInitialState() {
  if (!window.localStorage) {
    return undefined;
  }

  const storedState = window.localStorage.getItem(storeKey);

  if (!storedState) {
    return undefined;
  }

  const normalisedState = storedState.replace(new RegExp('"isFetching":true', 'g'), '"isFetching":false');
  return JSON.parse(normalisedState);
}
function getInitialState() {
  if (!window.localStorage) {
    return undefined;
  }

  const storedState = window.localStorage.getItem(storeKey);

  if (!storedState) {
    return undefined;
  }

  const normalisedState = storedState.replace(new RegExp('"isFetching":true', 'g'), '"isFetching":false');
  return JSON.parse(normalisedState);
}
function getInitialState ( ) { if ( ! window . localStorage ) { return undefined ; } const storedState = window . localStorage . getItem ( storeKey ) ; if ( ! storedState ) { return undefined ; } const normalisedState = storedState . replace ( new RegExp ( '"isFetching":true' , 'g' ) , '"isFetching":false' ) ; return JSON . parse ( normalisedState ) ; }
Returns a normalised initialState from the localstorage.
@returns {Object}
Returns a normalised initialState from the localstorage .