canjs / can-define

Observable properties
https://canjs.com/doc/can-define.html
MIT License
15 stars 7 forks source link

VM property with a getter and a return from a setter throws an error #418

Open mjstahl opened 5 years ago

mjstahl commented 5 years ago

If you have a VM property with a getter and a setter, and you return from that setter you will see the following error on the console:

canReflect.setValue - cannot set the value

The following codepen provides an example.

https://codepen.io/kphillips86/pen/WLdYNP?editors=0011

chasenlehara commented 5 years ago

I’m not sure that throwing an error is a bug (an error of some sort seems useful). It would be nice to change the error to something more understandable though.

justinbmeyer commented 5 years ago

Yeah, I think there’s already an issue for this. Basically any setting would be ignored.