Skip to content

Commit 3ccd70a

Browse files
Remove ObjectValue.EMPTY (#3022)
Remove a dangling static reference.
1 parent da3582b commit 3ccd70a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/firestore/src/model/object_value.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export const enum TypeOrder {
4949
* ability to add and remove fields (via the ObjectValueBuilder).
5050
*/
5151
export class ObjectValue {
52-
static EMPTY = new ObjectValue({ mapValue: {} });
5352

5453
constructor(public readonly proto: { mapValue: api.MapValue }) {
5554
debugAssert(

packages/firestore/test/unit/model/object_value_builder.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('ObjectValueBuilder', () => {
2727
it('supports empty builders', () => {
2828
const builder = new ObjectValueBuilder();
2929
const object = builder.build();
30-
expect(object.isEqual(ObjectValue.EMPTY)).to.be.true;
30+
expect(object.isEqual(ObjectValue.empty())).to.be.true;
3131
});
3232

3333
it('sets single field', () => {
@@ -109,7 +109,7 @@ describe('ObjectValueBuilder', () => {
109109
builder.set(field('foo'), wrap('foo'));
110110
builder.delete(field('foo'));
111111
const object = builder.build();
112-
expect(object.isEqual(ObjectValue.EMPTY)).to.be.true;
112+
expect(object.isEqual(ObjectValue.empty())).to.be.true;
113113
});
114114

115115
it('sets and deletes nested field', () => {

0 commit comments

Comments
 (0)