You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error produced when empty map is present. Document.getProtoField incorrectly assumes a "fields" prop is present in mapValue. I don't know if this assumption is correct or if the mapValue should always have a "fields" property even if it is empty.
@david0178418 Thanks very much for the bug report and for tracking down the PR that caused it. 😄 That saves us a lot of time. We'll take a look and try to get this fixed promptly. Thank you!
@david0178418 I'll get this fixed ASAP. In the meantime, if you call DocumentSnapshot.data() first, you should not hit the problematic codepath in subsequent calls to DocumentSnapshot.get().
Update: The codepath seems to only be hit during internal Query processing. The only workaround might be the dummy field you suggested.
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Error produced when empty map is present.
Document.getProtoField
incorrectly assumes a "fields" prop is present in mapValue. I don't know if this assumption is correct or if the mapValue should always have a "fields" property even if it is empty.Method first appeared in firebase v6.6.0 as part of #2115
Steps to reproduce:
Expected Behavior: Loads data without error
Actual: Crashes
Adding a dummy prop works around the issue.
Relevant Code:
Full error:
The text was updated successfully, but these errors were encountered: