getDocument automatically returns error if document does not exist
markmtran opened this issue · comments
Mark Tran commented
const doc = firestore.getDocument(finalDateStr + '/' + data.itemName)
I want to check if a document exists before executing some code, but I am unable to because getDocument seems to throw an error rather than returning NULL or undefined.
Is there some way to check if a document exists?
Mark Tran commented
Ah, I see that this question has already been asked. Thank you anyway, but if there are any updates do let me know!