fix(database, update): allow empty objects in ref.update() #5220
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As pointed out by @daveGregorian firebase-js-sdk allows empty objects
while the code here was enforcing that the objects had at least one key
Related issues
Fixes #5218
Release Summary
Conventional commit message
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
Verified (with investigation in linked issue) that firebase-js-sdk allows empty objects through), added an e2e test that verifies firebase-ios-sdk and firebase-android-sdk handle empty objects, and those work, so removing the check in our javascript layer should be fine
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter