Open zhezhang77 opened 2 years ago
I don't think the library handles empty documents like that. I'm curious to a valid use case, @zhezhang77.
I don't think the library handles empty documents like that. I'm curious to a valid use case, @zhezhang77.
An empty document in the database indicates that a site exists but has no record right now. I understand that I can change the fields definition of the document to avoid creating an empty one, but it's a risky action to upgrade the whole database and codes in other clients (Python, C#, etc).
Since there is no restriction to create an empty document on all platforms including FirestoreApp, I think it is reasonable to read that document out without throwing any errors.
Minimal code to reproduce the problem
Create an empty document (no fields) in the firestore "test_col/test_doc"
Expected Behavior
'data' should be valid and 'data.obj' = {}
Actual Results
Get the error message when calling 'getDocument':
Library Version:
v33