diff options
author | 2017-12-10 14:40:22 -0800 | |
---|---|---|
committer | 2017-12-10 14:40:22 -0800 | |
commit | bc179ea4ea7edff419a40d4fed423123f9f08a2b (patch) | |
tree | 764a0eee347c1c2f195615b3e0de0d0061b3e5bf /Firestore/Source/API/FIRQuerySnapshot.m | |
parent | 91f26774b45192f3c7b4302a7d9f69fc2e904eee (diff) |
Making DocumentSnapshot nullable
Diffstat (limited to 'Firestore/Source/API/FIRQuerySnapshot.m')
-rw-r--r-- | Firestore/Source/API/FIRQuerySnapshot.m | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Firestore/Source/API/FIRQuerySnapshot.m b/Firestore/Source/API/FIRQuerySnapshot.m index 6bc6761..5e1af9a 100644 --- a/Firestore/Source/API/FIRQuerySnapshot.m +++ b/Firestore/Source/API/FIRQuerySnapshot.m @@ -57,7 +57,7 @@ NS_ASSUME_NONNULL_BEGIN @implementation FIRQuerySnapshot { // Cached value of the documents property. - NSArray<FIRDocumentSnapshot *> *_documents; + NSArray<FIRQueryDocumentSnapshot *> *_documents; // Cached value of the documentChanges property. NSArray<FIRDocumentChange *> *_documentChanges; @@ -93,18 +93,18 @@ NS_ASSUME_NONNULL_BEGIN return self.snapshot.documents.count; } -- (NSArray<FIRDocumentSnapshot *> *)documents { +- (NSArray<FIRQueryDocumentSnapshot *> *)documents { if (!_documents) { FSTDocumentSet *documentSet = self.snapshot.documents; FIRFirestore *firestore = self.firestore; BOOL fromCache = self.metadata.fromCache; - NSMutableArray<FIRDocumentSnapshot *> *result = [NSMutableArray array]; + NSMutableArray<FIRQueryDocumentSnapshot *> *result = [NSMutableArray array]; for (FSTDocument *document in documentSet.documentEnumerator) { - [result addObject:[FIRDocumentSnapshot snapshotWithFirestore:firestore - documentKey:document.key - document:document - fromCache:fromCache]]; + [result addObject:[FIRQueryDocumentSnapshot snapshotWithFirestore:firestore + documentKey:document.key + document:document + fromCache:fromCache]]; } _documents = result; |