title: I keep getting this error "TypeError: Cannot read property 'some' of undefined"
body: <p>There is where I used the function some : </p>
  
  <pre><code>&lt;span className={`icon-eye${
    moviesWatched.some(watch =&gt; watch.id === movie.id)
      ? "-blocked"
      : ""
    }`}
    onClick={() =&gt; handleChange(movie)}
  /&gt;
  </code></pre>
  
  <p>This is what's inside moviesWatched state:</p>
  
  <pre><code>0:{…}
  id:399248
  </code></pre>
  
  <p>This is how moviesWatched gets it values:</p>
  
  <pre><code>handleChange= (movie) =&gt; {
    this.setState({toggleWatched:!this.state.toggleWatched}, () =&gt; this.Toggling())
  
    const { moviesWatched } = this.state;
    const { id } = movie;
    const _movie ={id};
  
    if(!moviesWatched.find(watch =&gt; watch.id === movie.id)){
      return this.setState({moviesWatched:[...moviesWatched,_movie]})
    }
  
    const WatchedList = moviesWatched.filter(watch =&gt; watch.id !== _movie.id)
    this.setState({moviesWatched:WatchedList})
  }
  </code></pre>
  
  <p>Why is there, the error:</p>
  
  <blockquote>
    <p>TypeError: Cannot read property 'some' of undefined</p>
  </blockquote>
  
  <p>even tough <code>moviesWatched</code> isn't <code>undefined</code>?</p>