Skip to content

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

@kevinpschaaf

Description

@kevinpschaaf

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions