<commit_before>import { createRoutes } from '../router'

const transformState = uiengineState => {
  const { entities, navigation } = uiengineState

  if (Object.keys(entities).length === 0 && navigation) {
    delete navigation.entities

    const entitiesIndex = navigation.index.childIds.indexOf('entities')
    navigation.index.childIds.splice(entitiesIndex, 1)
  }

  return uiengineState
}
<commit_msg>🐛 fix entities page deletion from nav<commit_after>import { createRoutes } from '../router'

const transformState = uiengineState => {
  const { entities, navigation } = uiengineState

  if (Object.keys(entities).length === 0 && navigation) {
    delete navigation.entities

    const entitiesIndex = navigation.index.childIds.indexOf('entities')
    if (entitiesIndex !== -1) navigation.index.childIds.splice(entitiesIndex, 1)
  }

  return uiengineState
}

{'fraction_non_alphanumeric': 0.11662817551963048, 'fraction_numerical': 0.005773672055427252, 'mean_word_length': 4.41875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5880831', 'n_tokens_mistral': 249, 'n_tokens_neox': 245, 'n_words': 57}