Closed dtinth closed 9 years ago
The classic synchronous stream problem, once again. I'm travelling, cannot look up the orig issue.
Found it in FAQ:
https://github.com/baconjs/bacon.js/wiki/FAQ#why-isnt-my-subscriber-called
I think I can close this issue now, as it seems to be a well known one.
Somehow, when an EventStream is converted to a property, it fails to emit event if these properties based on the same EventStream is combined in some way:
I expected that
[ 2, 3 ]
would be printed out, but it just ends:Let’s give them an initial value:
Here, the value
1
did get toa
but did not get tob
, so it has a value of0
, which is really weird. The behavior here depends on which property gets combined first.Workaround: Right now I worked around it delaying the
Bacon.once
by 0 milliseconds. This is far from ideal, but works: