Skip to content

Commit 6d69bb8

Browse files
committed
we should call ObjectValue.delete if value is null.
1 parent 39d0238 commit 6d69bb8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/firestore/src/model/mutation.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,11 @@ export function calculateOverlayMutation(
255255
if (value === null && path.length > 1) {
256256
path = path.popLast();
257257
}
258-
patchValue.set(path, docValue.field(path)!);
258+
if (value === null) {
259+
patchValue.delete(path);
260+
} else {
261+
patchValue.set(path, value);
262+
}
259263
maskSet = maskSet.add(path);
260264
}
261265
});

0 commit comments

Comments
 (0)