Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7de26d3

Browse files
authored
Merge pull request #221 from FrankSalad/v3-exists-fn
V3 exists fn
2 parents b395e26 + 0ad1159 commit 7de26d3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

‎docs/api/database.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ firestack.database()
2525
});
2626
```
2727

28+
Test value exists at location:
29+
```javascript
30+
firestack.database()
31+
.ref('posts/1234')
32+
.on('value', (snapshot) => {
33+
const exists = snapshot.exists();
34+
});
35+
```
36+
2837
Basic write with priority example:
2938
```javascript
3039
firestack.database()

‎lib/modules/database/snapshot.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export default class Snapshot {
2222
this.ref = ref;
2323
this.key = snapshot.key;
2424
this.value = snapshot.value;
25-
this.exists = snapshot.exists || true;
2625
this.priority = snapshot.priority === undefined ? null : snapshot.priority;
2726
this.childKeys = snapshot.childKeys || [];
2827
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /