From ea8c05be39fe478483842fed7572e5aaa90f73b2 Mon Sep 17 00:00:00 2001 From: Remco Date: Wed, 14 Jul 2021 11:21:17 +0200 Subject: [PATCH] return undefined when doc doesn't exist --- projects/akita-ng-fire/src/lib/utils/query/await-sync-query.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/akita-ng-fire/src/lib/utils/query/await-sync-query.ts b/projects/akita-ng-fire/src/lib/utils/query/await-sync-query.ts index ca0019cf..031f81aa 100644 --- a/projects/akita-ng-fire/src/lib/utils/query/await-sync-query.ts +++ b/projects/akita-ng-fire/src/lib/utils/query/await-sync-query.ts @@ -81,7 +81,7 @@ export function awaitQuery> */ const getAllSubQueries = (parentQuery: Query, entity: T): Observable => { if (!entity) { - return throwError(`Nothing found at path : ${parentQuery.path}`); + return of(undefined); } // There is no subqueries return the entity if (!hasSubQueries(parentQuery)) {