Skip to content

Firestore set() with {merge: true} does not merge empty objects #365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
merlinnot opened this issue Oct 12, 2018 · 2 comments
Closed

Firestore set() with {merge: true} does not merge empty objects #365

merlinnot opened this issue Oct 12, 2018 · 2 comments

Comments

@merlinnot
Copy link
Contributor

  • Operating System version: any
  • Firebase SDK version: 6.0.0
  • Library version: _____
  • Firebase Product: Firestore

Steps to reproduce:

Behaviour is exactly the same as described in firebase/firebase-js-sdk#1168, tested using transactions.

To reproduce, set any document to { data: { "i-am": "important" } } and run the code below in a transaction. data will be set to an empty object. Didn't test it with simple set.

Relevant Code:

transaction.set(documentReference, { data: {} }, { merge: true })
@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@wilhuff
Copy link

wilhuff commented Jan 7, 2019

Sorry for the delay in resolving this, but upon review we believe this is working correctly, and consistently with the other SDKs.

See commentary here: firebase/firebase-js-sdk#1371 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants