diff --git a/package.json b/package.json index e0e1c49..423bdc3 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/FirebaseList.js b/src/FirebaseList.js index 4834acc..759e2ef 100644 --- a/src/FirebaseList.js +++ b/src/FirebaseList.js @@ -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() {