I'm trying to update data in a Cloud Firestore document, but I'm getting an error stating the .where() function isn't available on references, even though the documentation says it should be.
Code below:
deleteJob(e){
//in Firebase, set "active" on job to N
/**
* The id of the job to delete will be bound to the element that calls it here
**/
let toInactivate = e.currentTarget.attributes[0].value;
console.log(toInactivate);
db.collection('jobs').doc().where("job_uuid", "==", toInactivate).update({
"active": false
})
}
Where db is the firestore reference variable.
Why is this not working?