firestore security rule resource.data is empty object
问题 In firestore security rule, the resource.data is an emtpy object always, is this a bug or something ? My firestore rules: service cloud.firestore { match /databases/{database}/documents { match /hospitals/{document=**}{ // allow read :if resource.data.size() == 0; //this return true, resource.data is an empty object allow read :if resource.data.name != null; // this doesn't work } } } My javascript: auth().onAuthStateChanged((user) => { if (user) { //db is the firestore instance db.collection