Today while working on Cloud Firestore using Admin SDK, I accidentally forget to replace .update with .set with merge true option and to my surprise the query worked and document got created. I removed merge:true and then I got document not exists error. I tested it again with merge:true and document created again. I could not find anything about this in documentation. Can anybody explain this behavior.
let query = userRolesRef
.doc(user).update(
{
isDeliveryPerson:true
},
{ merge: true }
);
update()method can take several parameters. I would suggest you contact Firebase support and/or you post in this Google Group: groups.google.com/forum/#!forum/firebase-talk - Renaud Tarnec