Skip to content

Commit

Permalink
optional idField
Browse files Browse the repository at this point in the history
  • Loading branch information
barbuza committed Mar 29, 2016
1 parent e2d964a commit e3a1dc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kebakaran",
"version": "0.4.0",
"version": "0.4.1",
"description": "high level utilities for firebase interaction",
"main": "index.js",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion src/FirebaseList.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ export class FirebaseList extends Emitter {
}

get data() {
return this.keys.map(key => ({ ...this.values[key], [this.idField]: key }));
if (this.idField) {
return this.keys.map(key => ({ ...this.values[key], [this.idField]: key }));
}
return this.keys.map(key => ({ ...this.values[key] }));
}

flush() {
Expand Down

0 comments on commit e3a1dc9

Please sign in to comment.