Skip to content

Commit

Permalink
🫗 Nil update when document empty in listening
Browse files Browse the repository at this point in the history
  • Loading branch information
benlmyers committed Sep 1, 2022
1 parent d590b72 commit 0f1ab5d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/EasyFirebase/Services/Firestore/Listening.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ extension EasyFirestore {
let listener = db.collection(colName(of: T.self)).document(id).addSnapshotListener { snapshot, _ in
guard let snapshot = snapshot, snapshot.exists else {
EasyFirebase.log(error: "A document with ID [\(id)] loaded from the [\(colName(of: T.self))] collection, but no data could be found.")
completion(nil)
return
}
var document: T?
Expand Down

0 comments on commit 0f1ab5d

Please sign in to comment.