TypeError: undefined is not an object (evaluating ‘ref.onSnapshot’)

Angular and Firebase Firestore throws TypeError: undefined is not an object (evaluating ‘ref.onSnapshot’)

      .collection(`claims`, ref => {
        let query:
          | firebase.default.firestore.CollectionReference
          | firebase.default.firestore.Query = ref;

          if(someValue === true) {
            return query.where('field1', '==', 20);


Source: JavaSript – Stack Overflow

November 22, 2021
Category : News
Tags: angular | firebase | google-cloud-firestore | javascript

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.