diff --git a/src/firestore/document/document.ts b/src/firestore/document/document.ts index cad381027..8af9956b5 100644 --- a/src/firestore/document/document.ts +++ b/src/firestore/document/document.ts @@ -89,9 +89,9 @@ export class AngularFirestoreDocument { /** * Listen to unwrapped snapshot updates from the document. */ - valueChanges(): Observable { + valueChanges(): Observable { return this.snapshotChanges().map(action => { - return (action.payload.exists ? action.payload.data() : null) as T; + return action.payload.exists ? action.payload.data() as T : null; }); } }