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 efc0f54 commit ea8c05b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function awaitQuery<Service extends CollectionService<CollectionState<E>>
*/
const getAllSubQueries = <T>(parentQuery: Query<T>, entity: T): Observable<T> => {
if (!entity) {
return throwError(`Nothing found at path : ${parentQuery.path}`);
return of(undefined);
}
// There is no subqueries return the entity
if (!hasSubQueries(parentQuery)) {
Expand Down

0 comments on commit ea8c05b

Please sign in to comment.