diff --git a/lib/mixins/properties-changed.js b/lib/mixins/properties-changed.js index d200a3dffc..22766a3164 100644 --- a/lib/mixins/properties-changed.js +++ b/lib/mixins/properties-changed.js @@ -134,10 +134,12 @@ export const PropertiesChanged = dedupingMixin( if (!this.hasOwnProperty('__dataAttributes')) { this.__dataAttributes = Object.assign({}, this.__dataAttributes); } - if (!this.__dataAttributes[property]) { - const attr = this.constructor.attributeNameForProperty(property); + let attr = this.__dataAttributes[property]; + if (!attr) { + attr = this.constructor.attributeNameForProperty(property); this.__dataAttributes[attr] = property; } + return attr; } /** diff --git a/lib/mixins/properties-mixin.js b/lib/mixins/properties-mixin.js index 06fe449d38..9420e79769 100644 --- a/lib/mixins/properties-mixin.js +++ b/lib/mixins/properties-mixin.js @@ -122,7 +122,7 @@ export const PropertiesMixin = dedupingMixin(superClass => { if (!this.hasOwnProperty('__observedAttributes')) { register(this.prototype); const props = this._properties; - this.__observedAttributes = props ? Object.keys(props).map(p => this.attributeNameForProperty(p)) : []; + this.__observedAttributes = props ? Object.keys(props).map(p => this.prototype._addPropertyToAttributeMap(p)) : []; } return this.__observedAttributes; } diff --git a/test/unit/disable-upgrade.html b/test/unit/disable-upgrade.html index ff705f7e9f..158935b9cc 100644 --- a/test/unit/disable-upgrade.html +++ b/test/unit/disable-upgrade.html @@ -271,6 +271,25 @@