title: Uncaught TypeError: Cannot read property 'includes' of undefined - ReactJS
body: <p>I am trying to filter some values by the variable, lastO, which I know has a value being properly assigned to it. However, when trying to get sortedDatesA, I'm getting the error: Uncaught TypeError: Cannot read property 'includes' of undefined.
  Here is my React code:</p>
  <pre><code>const ANDEo = [...new Set(channelSelectedData.map(data =&gt;data.outage))].sort(sortAlphaNum) 
  const lastO = ANDEo[ANDEo.length-1]
  console.log(lastO)
  const sortedDatesA = this.props.channelSelectedData.map(data =&gt; data.outage.includes(lastO)).slice().sort((a, b) =&gt; b.scanned - a.scanned)
  </code></pre>