RxJS version:
5.3.0
Code to reproduce:
Rx.Observable.of('foo')
.delayWhen(function() {
return Rx.Observable.of('bar');
})
.subscribe({
next: function(x) {
console.log('next');
},
complete: function() {
console.log('complete');
}
});
Expected behavior:
Output
'next'
'complete'
Actual behavior:
Output
'next'
Additional information:
If you substitute delayWhen(...) for say delay(1000) in the above, it will emit complete as expected.
Here is a jsFiddle using https://unpkg.com/rxjs/bundles/Rx.min.js showcasing the issue.