From 949c740668ae175b28b385dc772651c9ede0851e Mon Sep 17 00:00:00 2001 From: Milo Hill Date: Wed, 29 Sep 2021 20:23:01 +0100 Subject: [PATCH 1/2] docData return type to include undefined --- firestore/document/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firestore/document/index.ts b/firestore/document/index.ts index 29e6c94..f3be352 100644 --- a/firestore/document/index.ts +++ b/firestore/document/index.ts @@ -34,8 +34,8 @@ export function docData( options: { idField?: string }={} -): Observable { - return doc(ref).pipe(map(snap => snapToData(snap, options) as T)); +): Observable { + return doc(ref).pipe(map(snap => snapToData(snap, options) as T | undefined)); } export function snapToData( From 1349b8d6db889b2dbf153bfbc9996b80c957c258 Mon Sep 17 00:00:00 2001 From: David East Date: Tue, 11 Jul 2023 10:11:02 +0000 Subject: [PATCH 2/2] eslint fixes --- firestore/document/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firestore/document/index.ts b/firestore/document/index.ts index 8ff1ed4..8faf34a 100644 --- a/firestore/document/index.ts +++ b/firestore/document/index.ts @@ -33,9 +33,9 @@ export function docData( ref: DocumentReference, options: { idField?: string - }={} + }={}, ): Observable { - return doc(ref).pipe(map(snap => snapToData(snap, options) as T | undefined)); + return doc(ref).pipe(map((snap) => snapToData(snap, options) as T | undefined)); } export function snapToData(