The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/firestore > lite > DocumentSnapshot > exists

DocumentSnapshot.exists() method

Signals whether or not the document at the snapshot's location exists.

Signature:

exists(): this is QueryDocumentSnapshot<T>;

Returns:

this is QueryDocumentSnapshot<T>

true if the document exists.