how to handle the nullity case within a switchmap operator ? I found this workaround, but I get the impression it’s not great to do this:
this.userService
.getApporteurId()
.pipe(
switchMap((test) =>
test ? this.mesQuotasService.getQuotas(test) : of({})
)
)
.subscribe((quotas: any) => console.log(quotas));
}
Thanks for help