Skip to content

Commit

Permalink
return undefined when doc doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
RemcoSimonides authored and GrandSchtroumpf committed Jul 14, 2021
1 parent 9109fcc commit 3ead84d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function awaitQuery<Service extends CollectionService<CollectionState<E>>
const { id } = getIdAndPath({ path });
return this['db'].doc<E>(path).valueChanges().pipe(
switchMap(entity => getAllSubQueries(query, entity)),
map(entity => ({ id, ...entity }))
map(entity => entity ? ({ id, ...entity }) : undefined)
);
}
// IF COLLECTION
Expand Down

0 comments on commit 3ead84d

Please sign in to comment.