diff --git a/lib/mixins/element-mixin.html b/lib/mixins/element-mixin.html index 2c4b0f0100..92b728d714 100644 --- a/lib/mixins/element-mixin.html +++ b/lib/mixins/element-mixin.html @@ -603,14 +603,17 @@ } for (let p in p$) { let info = p$[p]; - if (!this._isPropertyPending(p)) { + // Don't set default value if there is already an own property, which + // happens when a `properties` property with default but no effects had + // a property set (e.g. bound) by its host before upgrade + if (!this.hasOwnProperty(p)) { let value = typeof info.value == 'function' ? info.value.call(this) : info.value; // Set via `_setProperty` if there is an accessor, to enable // initializing readOnly property defaults if (this._hasAccessor(p)) { - this._setProperty(p, value) + this._setPendingProperty(p, value, true); } else { this[p] = value; } diff --git a/test/unit/configure.html b/test/unit/configure.html index 02d7921283..21ce6d5269 100644 --- a/test/unit/configure.html +++ b/test/unit/configure.html @@ -270,6 +270,10 @@ defaultUsesNoEffectProp: { type: Number }, + boundNoEffectProp: { + type: Number, + value: 5 + }, prop: { value: 'lazy', observer: 'propChanged' @@ -294,7 +298,7 @@