When an error occurs, my pipe returns of{}
. I need to filter it to redirect to other code flows. Currently, I am using the following scenario. Is there a way to remove the map and filter it within the existing filter?
readonly k$ = combineLatest(
[this.x$.pipe(filter(isNotNullOrUndefined), //this filter does not filter out of{} type.
map((res: A) => { //I want to eliminate this map
return res;
})
), this.y$]).pipe(shareReplayUntil(this.destroySub));