I'm passing to the sources array two functions dynamically, but I'm having a problem when only one function is being passed.
How to mock empty observable, so if the second function is passed to not have it mapped with a, but with b.
let sources = [];
if (!isNullOrUndefined(email_address)) {
sources.push(this.commonService.lookUpEmailAddress(emailParameters));
}
if (!isNullOrUndefined(telephone_number)) {
sources.push(this.commonService.lookUpTelephoneNumber(telephoneParameters));
}
forkJoin(...sources)
.subscribe(
([a, b]) => { // do stuff here }