Skip to content

Commit 6ca78a1

Browse files
forEach and map method on the DataSnapshot does not retain key
1 parent 7d09ab4 commit 6ca78a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/modules/database.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class DataSnapshot {
3535

3636
forEach(fn) {
3737
(this.childKeys || [])
38-
.forEach(key => fn(this.value[key]))
38+
.forEach(key => fn({key: key, value: this.value[key]}))
3939
}
4040

4141
map(fn) {

0 commit comments

Comments
 (0)