<commit_before>// @flow
import {createSelector} from 'reselect'

import selectCurrentBundle from './current-bundle'

export default createSelector(
  (state) => state.scenario.feeds,
  selectCurrentBundle,
  (feeds, bundle) => feeds.map((feed) => {
    const bundleFeed = bundle && bundle.feeds
      .find(({feedId}) => feedId === feed.id)
    return bundleFeed
      ? {...feed, name: bundleFeed.name}
      : {...feed, name: feed.checksum}
  })
)
<commit_msg>fix(feeds): Use feed id instead of checksum as back up feed name.<commit_after>// @flow
import {createSelector} from 'reselect'

import selectCurrentBundle from './current-bundle'

export default createSelector(
  (state) => state.scenario.feeds,
  selectCurrentBundle,
  (feeds, bundle) => feeds.map((feed) => {
    const bundleFeed = bundle && bundle.feeds
      .find(({feedId}) => feedId === feed.id)
    return bundleFeed
      ? {...feed, name: bundleFeed.name}
      : {...feed, name: feed.id}
  })
)

{'fraction_non_alphanumeric': 0.15670103092783505, 'fraction_numerical': 0.0, 'mean_word_length': 3.516279069767442, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '3617295', 'n_tokens_mistral': 310, 'n_tokens_neox': 307, 'n_words': 79}