I have this observable subscribtion
this.tooltipEventSubject.pipe(
filter(event => event.type === "show"),
tap(() => this.tooltipContent.loading = true),
filter(() => this.messageContent?.sender !== undefined && this.tooltipContent.success === undefined),
mergeMap(() => this.jabService.searchEntityInAddressBook(this.messageContent?.sender ?? "")),
mergeMap(response => response.values),
filter(response => response !== undefined) as OperatorFunction<Entity | undefined, Entity>,
tap(() => console.log("before first")),
find(entity => entity.name === this.messageContent?.sender),
tap(() => console.log("after first")),
).subscribe({
next: () => console.log("next"),
error: err => console.log(err),
complete: () => console.log("complete")
})
It hits the "find" predicate (checked with debugger) and then does nothing.
I have tried a lot of operators, like first following by a catchError, here on this example I have find.
It is getting to "before first", but then it won't print anything else. I am aware that the find predicate is returning false, and it should. But why does it stop running ? Shouldn't it return "undefined" to the following operators ? And shouldn't it even print "complete" ?
Thank you for your answers