.not() appears to always return false, rather than inverting booleans
jackmott opened this issue · comments
Bacon.version 0.7.83 from nuget
Following along this tutorial here:
https://baconjs.github.io/tutorials.html
var availabilityResponse = availabilityRequest.ajax();
var usernameAvailable = availabilityResponse.toProperty(true);
usernameAvailable.not().onValue(setVisibility, unavailabilityLabel);
usernameAvailable.not()
appears to return false no matter what usernameAvailable is, as usernameAvailable changes from ajax events. It does work properly with the initial property setting (ie, if you change toProperty(false)
above, usernameAvailable.not().log() return true.
ah, I think this is because ajax is returning the strings true and false, and not booleans. This might be a bug in the tutorial but not in baconjs.