title: Array.filter() returning empty array although condition is true
body: <p>I am trying to use filter to create a new array coming from firebase-firestore</p>
  <p>this is the filter function- when console loging the result of <code>myTweet.userId === firebase.auth().currentUser.uid</code> it returns true.</p>
  <pre><code>  isEqualToMyTweets = (myTweet) =&gt; {
          console.log(myTweet.userId)
          console.log(firebase.auth().currentUser.uid)
          console.log(myTweet.userId === firebase.auth().currentUser.uid)
          return myTweet.userID == firebase.auth().currentUser.uid;
      }
  </code></pre>
  <p>yet when calling the function it returns an empty array:</p>
  <pre><code>    onListenForTweets() {
          this.unsubscribe = firebase.firestore()
              .collection('tweets')
              .orderBy('date', 'desc')
              .limit(this.state.limit)
              .onSnapshot((snap) =&gt; {
                  const tweets = snap.docs.map(docs =&gt;
                      ({ ...docs.data(), id: docs.id })
                     
                  );
                  this.setState({ tweets })
  
                  let myTweets = tweets.filter(this.isEqualToMyTweets);               
              });
      }
  </code></pre>
  <p>the reason I'm doing this is that i want to introduce a condition and accordingly present the tweets of a certain user.</p>
  <p>this is the components code:</p>
  <pre><code>
      constructor(props) {
          super(props);
          this.state = {
              tweets: [],
              loading: false,
              profile: &quot;&quot;,
              interval: null,
              limit: 10,
          };
          this.myTweets = []
      }
  
      componentDidMount() {
          this.onListenForTweets()
      }
  
      isEqualToMyTweets = (myTweet) =&gt; {
          console.log(myTweet.userId)
          console.log(firebase.auth().currentUser.uid)
          console.log(myTweet.userId === firebase.auth().currentUser.uid)
          return myTweet.userID == firebase.auth().currentUser.uid;
      }
  
      onListenForTweets() {
          this.unsubscribe = firebase.firestore()
              .collection('tweets')
              .orderBy('date', 'desc')
              .limit(this.state.limit)
              .onSnapshot((snap) =&gt; {
                  const tweets = snap.docs.map(docs =&gt;
                      ({ ...docs.data(), id: docs.id })
                     
                  );
                  this.setState({ tweets })
                  let myTweets = tweets.filter(this.isEqualToMyTweets);
                  console.log(myTweets)
              });
      }
  
      async handleOnNewTweet(newTweet) {
          await firebase.firestore()
              .collection('tweets')
              .add(newTweet)
      }
  
      componentWillUnmount() {
          this.unsubscribe();
      }
  
  </code></pre>
  <p>this is an example of the console.log</p>
  <pre><code>TweetRoom.jsx:38 c1btNa39vZe3ptPfuYUn2chUsAn1
  TweetRoom.jsx:39 c1btNa39vZe3ptPfuYUn2chUsAn1
  TweetRoom.jsx:40 true
  TweetRoom.jsx:38 c1btNa39vZe3ptPfuYUn2chUsAn1
  TweetRoom.jsx:39 c1btNa39vZe3ptPfuYUn2chUsAn1
  TweetRoom.jsx:40 true
  TweetRoom.jsx:38 c1btNa39vZe3ptPfuYUn2chUsAn1
  TweetRoom.jsx:39 c1btNa39vZe3ptPfuYUn2chUsAn1
  TweetRoom.jsx:40 true
  TweetRoom.jsx:38 c1btNa39vZe3ptPfuYUn2chUsAn1
  TweetRoom.jsx:39 c1btNa39vZe3ptPfuYUn2chUsAn1
  TweetRoom.jsx:40 true
  TweetRoom.jsx:38 c1btNa39vZe3ptPfuYUn2chUsAn1
  TweetRoom.jsx:39 c1btNa39vZe3ptPfuYUn2chUsAn1
  TweetRoom.jsx:40 true
  TweetRoom.jsx:38 c1btNa39vZe3ptPfuYUn2chUsAn1
  TweetRoom.jsx:39 c1btNa39vZe3ptPfuYUn2chUsAn1
  TweetRoom.jsx:40 true
  TweetRoom.jsx:56 []length: 0__proto__: Array(0)
  </code></pre>