We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents da34c79 + 80133de commit 0349b61Copy full SHA for 0349b61
lib/modules/database.js
@@ -35,7 +35,7 @@ class DataSnapshot {
35
36
forEach(fn) {
37
(this.childKeys || [])
38
- .forEach(key => fn(this.value[key]))
+ .forEach(key => fn({key: key, value: this.value[key]}))
39
}
40
41
map(fn) {
@@ -233,7 +233,7 @@ class DatabaseRef extends ReferenceBase {
233
const path = this.dbPath();
234
return this.db.off(path, evt, origCB)
235
.then(({callback, subscriptions}) => {
236
- if (dbSubscriptions[path] && dbSubscriptions[path][evt].length > 0) {
+ if (dbSubscriptions[path] && dbSubscriptions[path][evt] && dbSubscriptions[path][evt].length > 0) {
237
return subscriptions;
238
239
0 commit comments