canjs / can-map-define

Define rich attribute behavior
https://canjs.com/doc/can-map-define.html
MIT License
3 stars 2 forks source link

Allow setting properties to undefined #14

Closed matthewp closed 8 years ago

matthewp commented 8 years ago

This is the 3.0 fix for https://github.com/canjs/canjs/issues/2523

The setter logic interprets returning undefined as if the value will be set with the asynchronous setVal. It does this by looking at the number of params in the setter function; if 2 then it is an async setter. However the check was >= 1, when it should have been just > 1.

This should be easily backportable to 2.3.x.