Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use O.defineProperty instead of setter to avoid setter side effects #28

Closed
justinbmeyer opened this issue Dec 16, 2016 · 0 comments · Fixed by #29
Closed

Use O.defineProperty instead of setter to avoid setter side effects #28

justinbmeyer opened this issue Dec 16, 2016 · 0 comments · Fixed by #29
Assignees
Labels

Comments

@justinbmeyer
Copy link
Contributor

Related to canjs/can-define#117, it's better for overwrite to do:

Object.defineProperty(what, propName, {value: val, configurable: true, enumerable: true, writable: true});

than to do a simple set so if setters are on the base class, they won't get invoked during extension if overwritten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant