Reputation: 105
I am getting this error when i try to update data into my firebase:
Update() is not a function
My goal is to update the value of one boolean object that i have on my firebase.
Here is what i have :
firebase.firestore().object('/restaurant/' + key + '/loyaltyCard').update({loyaltyCard: false})
loyaltyCard is the value i want to change,but i cant seem to do that.
I watched some tutorials, read some firebase/firestore docs, but i am stuck now.
Upvotes: 1
Views: 197
Reputation: 569
The update function is not called correctly. See example:
firebase.firestore().collection(COLLECTION_NAME)
.doc(DOC_ID)
.update({loyaltyCard: false})
Upvotes: 1