Skip to content

Commit 775cc69

Browse files
committed
lower case types
1 parent 188c86f commit 775cc69

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class VectorValue {
5353
/** Returns a JSON-serializable representation of this `VectorValue` instance. */
5454
toJSON(): object {
5555
return {
56-
type: 'firestore/vectorValue/1.0',
56+
type: 'firestore/vectorvalue/1.0',
5757
vectorValues: this._values
5858
};
5959
}
@@ -72,8 +72,8 @@ export class VectorValue {
7272
if (typeof value !== 'string') {
7373
error = `json field 'type' must be a string.`;
7474
break;
75-
} else if (value !== 'firestore/vectorValue/1.0') {
76-
error = "Expected 'type' field to equal 'firestore/vectorValue/1.0'";
75+
} else if (value !== 'firestore/vectorvalue/1.0') {
76+
error = "Expected 'type' field to equal 'firestore/vectorvalue/1.0'";
7777
break;
7878
}
7979
} else {

packages/firestore/test/unit/api/vector_value.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('VectorValue', () => {
2929
});
3030

3131
it('fromJSON parameter order does not matter', () => {
32-
const type = 'firestore/vectorValue/1.0';
32+
const type = 'firestore/vectorvalue/1.0';
3333
const vectorValues = [1, 2, 3];
3434
const control = new VectorValue(vectorValues);
3535

@@ -44,15 +44,15 @@ describe('VectorValue', () => {
4444
});
4545

4646
it('fromJSON empty array does not throw', () => {
47-
const type = 'firestore/vectorValue/1.0';
47+
const type = 'firestore/vectorvalue/1.0';
4848
const vectorValues = [1, 2, 3];
4949
expect(() => {
5050
VectorValue.fromJSON({ type, vectorValues });
5151
}).to.not.throw;
5252
});
5353

5454
it('fromJSON missing fields throws', () => {
55-
const type = 'firestore/vectorValue/1.0';
55+
const type = 'firestore/vectorvalue/1.0';
5656
const vectorValues = [1, 2, 3];
5757
expect(() => {
5858
VectorValue.fromJSON({ type /* missing data */ });

0 commit comments

Comments
 (0)