<commit_before>import { matchPath } from 'react-router'

export const getRouteMatch = (routes, pathname) =>
  !routes ? null : routes
    .map(r => matchPath(pathname, r.path, { exact: true }))
    .filter(r => r !== null)[0] || nulle<commit_msg>Fix type error in getRouteMatch<commit_after>import { matchPath } from 'react-router'

export const getRouteMatch = (routes, pathname) =>
  !routes ? null : routes
    .map(r => matchPath(pathname, r.path, { exact: true }))
    .filter(r => r !== null)[0] || null
{'fraction_non_alphanumeric': 0.1650294695481336, 'fraction_numerical': 0.003929273084479371, 'mean_word_length': 4.151515151515151, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '7269886', 'n_tokens_mistral': 168, 'n_tokens_neox': 171, 'n_words': 45}