can-define
can-define copied to clipboard
VM property with a getter and a return from a setter throws an error
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
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.
Yeah, I think there’s already an issue for this. Basically any setting would be ignored.