baconjs / bacon.js

Functional reactive programming library for TypeScript and JavaScript

Home Page:https://baconjs.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Property.awaiting bug

raimohanska opened this issue · comments

The awaiting method has problems when dealing with Properties. For instance

a = Bacon.constant(1)
a.awaiting(a).log()

This will surprisingly yield "true".

Root cause to the problem is that awaiting is based on groupSimultaneous which fails to recognize the Initial values of the two properties (in the example that's the same property twice) as simultaneous. As a result, the Property returned by awaiting will receive two initial values [true, false] the latter of which it will skip and end up with the wrong result.

I don't have a fix in mind yet.

Fixed in 0.7.77