Skip to content

Commit 2bd9d1c

Browse files
Final edits
1 parent 67e658d commit 2bd9d1c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

packages/firestore/src/lite/reference_impl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ export function getDoc<T>(
128128
return invokeBatchGetDocumentsRpc(datastore, [reference._key]).then(
129129
result => {
130130
hardAssert(result.length === 1, 'Expected a single document result');
131-
const maybeDocument = result[0];
131+
const document = result[0];
132132
return new DocumentSnapshot<T>(
133133
reference.firestore,
134134
userDataWriter,
135135
reference._key,
136-
maybeDocument.isFoundDocument() ? maybeDocument : null,
136+
document.isFoundDocument() ? document : null,
137137
reference._converter
138138
);
139139
}

packages/firestore/src/model/document.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ import { ObjectValue } from './object_value';
2323
import { FieldPath } from './path';
2424
import { valueCompare } from './values';
2525

26+
/**
27+
* Whether the document represents an existing document, a document that is
28+
* known to exist or a document whose state or existence is unknown.
29+
*/
2630
const enum DocumentType {
2731
/**
2832
* Represents the initial state of a MutableDocument when only the document

packages/firestore/src/model/mutation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export abstract class Mutation {
217217
/**
218218
* Applies this mutation to the given document for the purposes of computing a
219219
* new remote document. If the input document doesn't match the expected state
220-
* (e.g. it is invalid or outdated), the document state may transition to
220+
* (e.g. it is invalid or outdated), the document type may transition to
221221
* unknown.
222222
*
223223
* @param mutation - The mutation to apply.

0 commit comments

Comments
 (0)