<commit_before>import React from 'react';
import DefaultRenderer from './DefaultRenderer';

export default function Switch(props) {
  const navState = props.navigationState;
  const selector = props.selector;
  if (!selector) console.error('Selector should be defined.');
  const selectedKey = selector(props);
  if (!selectedKey) console.error('Selector should return key.');
  const selected = navState.children.filter(el => el.sceneKey === selectedKey);
  if (!selected) console.error(`A scene for key “${selectedKey}” does not exist.`);
  const navigationState = selected[0];
  if (!navigationState) console.error(`Cannot find a scene with key “${selectedKey}”`);
  return (
    <DefaultRenderer
      onNavigate={this.props.onNavigate}
      navigationState={navigationState}
    />
  );
}<commit_msg>Fix Typo in Switch referring to this.props<commit_after>import React from 'react';
import DefaultRenderer from './DefaultRenderer';

export default function Switch(props) {
  const navState = props.navigationState;
  const selector = props.selector;
  if (!selector) console.error('Selector should be defined.');
  const selectedKey = selector(props);
  if (!selectedKey) console.error('Selector should return key.');
  const selected = navState.children.filter(el => el.sceneKey === selectedKey);
  if (!selected) console.error(`A scene for key “${selectedKey}” does not exist.`);
  const navigationState = selected[0];
  if (!navigationState) console.error(`Cannot find a scene with key “${selectedKey}”`);
  return (
    <DefaultRenderer
      onNavigate={props.onNavigate}
      navigationState={navigationState}
    />
  );
}
{'fraction_non_alphanumeric': 0.1271393643031785, 'fraction_numerical': 0.0012224938875305623, 'mean_word_length': 4.909747292418772, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1944900', 'n_tokens_mistral': 436, 'n_tokens_neox': 442, 'n_words': 134}