Skip to content

Commit 4c042b2

Browse files
docs: improve documentation for merge behavior (#5828)
1 parent c2fff0c commit 4c042b2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/firestore/src/lite-api/reference.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,12 @@ export type UpdateData<T> = T extends Primitive
9393
*
9494
* @param merge - Changes the behavior of a `setDoc()` call to only replace the
9595
* values specified in its data argument. Fields omitted from the `setDoc()`
96-
* call remain untouched.
96+
* call remain untouched. If your input sets any field to an empty map, all
97+
* nested fields are overwritten.
9798
* @param mergeFields - Changes the behavior of `setDoc()` calls to only replace
9899
* the specified field paths. Any field path that is not specified is ignored
99-
* and remains untouched.
100+
* and remains untouched. If your input sets any field to an empty map, all
101+
* nested fields are overwritten.
100102
*/
101103
export type SetOptions =
102104
| {

0 commit comments

Comments
 (0)