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

Default value from behavior lost when re-defining property on element #5503

Closed
kevinpschaaf opened this issue Mar 5, 2019 · 0 comments
Closed

Comments

@kevinpschaaf
Copy link
Member

kevinpschaaf commented Mar 5, 2019

Description

If a property is declared on a behavior to include a default value, and the property is also declared e.g. on the element (or any subsequent behavior) where the default value is not specified, the property will not be initialized. This is an unintentional compatibility change from Polymer 1.x.

Live Demo

3.x: https://jsbin.com/kuxoqig/edit?html,console,output
1.x: https://jsbin.com/puvowih/edit?html,console,output

Expected Results

Console logs "prop default value: 42"

Actual Results

Console logs "prop default value: undefined"

Browsers Affected

All

Versions

  • Polymer: v2.x-3.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant