<commit_before>import actionTypes from '../constants';

const initialState = {
  canManageLessonPlan: false,
  milestonesExpanded: 'all',
};

export default function (state = initialState, action) {
  const { type } = action;

  switch (type) {
    case actionTypes.LOAD_LESSON_PLAN_SUCCESS: {
      return { ...state, ...action.flags };
    }
    default:
      return state;
  }
}<commit_msg>Change default milestonesExpanded setting to `current`<commit_after>import actionTypes from '../constants';

export const initialState = {
  canManageLessonPlan: false,
  milestonesExpanded: 'current',
};

export default function (state = initialState, action) {
  const { type } = action;

  switch (type) {
    case actionTypes.LOAD_LESSON_PLAN_SUCCESS: {
      const nextState = { ...state, ...action.flags };
      if (!nextState.milestonesExpanded) {
        nextState.milestonesExpanded = initialState.milestonesExpanded;
      }
      return nextState;
    }
    default:
      return state;
  }
}
{'fraction_non_alphanumeric': 0.11422845691382766, 'fraction_numerical': 0.0, 'mean_word_length': 3.3624454148471616, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '252316', 'n_tokens_mistral': 307, 'n_tokens_neox': 299, 'n_words': 71}