This issue's title has been changed, as the implementation of delayWhen is not correct - see the discussion below.
The original issue's description follows.
RxJS version: 6.1.0
Code to reproduce:
import { EMPTY, of } from "rxjs";
import { delay, delayWhen } from "rxjs/operators";
of(0).pipe(
delayWhen(() => EMPTY.pipe(delay(0)))
).subscribe(console.log);
Expected behavior:
0 should be emitted and logged to the console.
Actual behavior:
Nothing is emitted and logged to the console.
If the of function is passed 1 instead of 0, 1 is logged to the console.
Additional information:
Looking at delayWhen, I can see another problem (other than #3663) with the implementation. If the value is falsy, and the notifier completes - rather than nexts - the value won't be emitted.