firebase.firestore.FieldValue.arrayUnion is not a function
02:29 27 Aug 2018

I'm trying to update an array in my firestore, i followed the documentation provided by Google (https://docs.cloud.google.com/firestore/native/docs/manage-data/add-data) but It doesn't work, I also checked to make sure I have the latest version of the firebase npm module.

Here's my code:

> db
                    .collection('Data')
                    .doc('One')
                    .collection('Doc')
                    .doc(this.$route.params.id.toLowerCase())
                    .update({
                        myArr: firebase.firestore.FieldValue.arrayUnion(
                           'test'
                        ),
                    })
                    .then(() => console.log('Successfully written'))
                    .catch(err => console.log(err));
javascript firebase google-cloud-firestore