can-define icon indicating copy to clipboard operation
can-define copied to clipboard

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

Open mjstahl opened this issue 6 years ago • 2 comments

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

mjstahl avatar Jan 02 '19 22:01 mjstahl

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.

chasenlehara avatar Jan 03 '19 00:01 chasenlehara

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

justinbmeyer avatar Jan 03 '19 01:01 justinbmeyer