Closed mrakgr closed 4 years ago
I'd like to point out that the root of the problem is the use of Observable.empty
, which switchMap
seems unable to recover from.
I'm getting similar behaviour but I'm not using Observable.empty
Doesn't work:
|> Observable.switchMap (fun term ->
if term.Length = 0 then Observable.single []
else Observable.ofAsync <| options.lookup term)
Does work:
|> Observable.map (fun term ->
if term.Length = 0 then Observable.single []
else Observable.ofAsync <| options.lookup term)
|> Observable.switch
Version 4.2.0 too.
Description
Repro steps
Please provide the steps required to reproduce the problem
Expected behavior
And so on.
Actual behavior
No further output.
Known workarounds
Replace the above with...
Related information
Version 4.2.0 of the
FSharp.Control.Reactive
.