When modifying a lens the value passed to the modification function seems to always be undefined. The modification can be successfully made to the original model.
var model = Bacon.$.Model({
left: "left"
});
var l = model.lens("left");
l.bind(Bacon.$.textFieldValue($("#left")));
// Doesn't work
l.modify(function(current){
return current + "-asdas";
});
// Works
model.modify(function(current){
return {left: current.left + "-asdas"};
});
When modifying a lens the value passed to the modification function seems to always be
undefined
. The modification can be successfully made to the original model.