From 37ed0d2b5e01e4539388b379c5646beb5e3d66ff Mon Sep 17 00:00:00 2001 From: Tim Blakely Date: Tue, 23 Jan 2018 09:37:17 -0800 Subject: [PATCH] fix(afs/typings): valueChanges should return Observable (#1321) --- src/firestore/document/document.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }); } }