File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -128,12 +128,12 @@ export function getDoc<T>(
128
128
return invokeBatchGetDocumentsRpc ( datastore , [ reference . _key ] ) . then (
129
129
result => {
130
130
hardAssert ( result . length === 1 , 'Expected a single document result' ) ;
131
- const maybeDocument = result [ 0 ] ;
131
+ const document = result [ 0 ] ;
132
132
return new DocumentSnapshot < T > (
133
133
reference . firestore ,
134
134
userDataWriter ,
135
135
reference . _key ,
136
- maybeDocument . isFoundDocument ( ) ? maybeDocument : null ,
136
+ document . isFoundDocument ( ) ? document : null ,
137
137
reference . _converter
138
138
) ;
139
139
}
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ import { ObjectValue } from './object_value';
23
23
import { FieldPath } from './path' ;
24
24
import { valueCompare } from './values' ;
25
25
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
+ */
26
30
const enum DocumentType {
27
31
/**
28
32
* Represents the initial state of a MutableDocument when only the document
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ export abstract class Mutation {
217
217
/**
218
218
* Applies this mutation to the given document for the purposes of computing a
219
219
* 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
221
221
* unknown.
222
222
*
223
223
* @param mutation - The mutation to apply.
You can’t perform that action at this time.
0 commit comments