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

Make computed properties implicitly readOnly. Fixes #1925. #1958

Merged
merged 3 commits into from
Jun 24, 2015

Conversation

kevinpschaaf
Copy link
Member

No description provided.

@@ -174,7 +174,8 @@
// ReadOnly properties have a private setter only
// TODO(kschaaf): Per current Bind factoring, we shouldn't
// be interrogating the prototype here
if (model.getPropertyInfo && model.getPropertyInfo(property).readOnly) {
var info = model.getPropertyInfo(property);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer guarding against model not having getPropertyInfo. We still need to do this.

@@ -77,7 +77,7 @@
if (args) {
var fn = this[effect.method];
if (fn) {
this[effect.property] = fn.apply(this, args);
this._setProperty(effect.property, fn.apply(this, args));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot make a readOnly property named property. Perhaps we should change the name of _setProperty?

@sorvell
Copy link
Contributor

sorvell commented Jun 24, 2015

LGTM

sorvell pushed a commit that referenced this pull request Jun 24, 2015
Make computed properties implicitly readOnly. Fixes #1925.
@sorvell sorvell merged commit 489bd29 into master Jun 24, 2015
@sorvell sorvell deleted the 1925-kschaaf branch June 24, 2015 22:37
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 this pull request may close these issues.

3 participants