diff --git a/docs/api/database.md b/docs/api/database.md index 7145d71..167a568 100644 --- a/docs/api/database.md +++ b/docs/api/database.md @@ -25,6 +25,15 @@ firestack.database() }); ``` +Test value exists at location: +```javascript +firestack.database() + .ref('posts/1234') + .on('value', (snapshot) => { + const exists = snapshot.exists(); + }); +``` + Basic write with priority example: ```javascript firestack.database() diff --git a/lib/modules/database/snapshot.js b/lib/modules/database/snapshot.js index 55dfbf0..832fa5c 100644 --- a/lib/modules/database/snapshot.js +++ b/lib/modules/database/snapshot.js @@ -22,7 +22,6 @@ export default class Snapshot { this.ref = ref; this.key = snapshot.key; this.value = snapshot.value; - this.exists = snapshot.exists || true; this.priority = snapshot.priority === undefined ? null : snapshot.priority; this.childKeys = snapshot.childKeys || []; }