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

[0.8] readOnly properties do not receive the initial value specified by value #1393

Closed
cdata opened this issue Apr 9, 2015 · 1 comment
Closed
Labels

Comments

@cdata
Copy link
Contributor

cdata commented Apr 9, 2015

Considering the following contrived element:

var XContrived = Polymer({
  is: 'x-contrived',
  properties: {
    foo: {
      type: Boolean,
      readOnly: true,
      value: false
    }
  }
});

And the following usage:

var el = new XContrived();

console.log(el.foo);

The following will be logged to the console:

undefined

This has impactful consequences when using readOnly properties as dependencies of computed properties. If the readOnly property remains undefined, the computed property will never be computed.

@kevinpschaaf
Copy link
Member

Fixed in 3428904.

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

No branches or pull requests

2 participants