diff --git a/lib/mixins/properties-changed.js b/lib/mixins/properties-changed.js index 22766a3164..cc2801d415 100644 --- a/lib/mixins/properties-changed.js +++ b/lib/mixins/properties-changed.js @@ -134,6 +134,12 @@ export const PropertiesChanged = dedupingMixin( if (!this.hasOwnProperty('__dataAttributes')) { this.__dataAttributes = Object.assign({}, this.__dataAttributes); } + // This check is technically not correct; it's an optimization that + // assumes that if a _property_ name is already in the map (note this is + // an attr->property map), the property mapped directly to the attribute + // and it has already been mapped. This would fail if + // `attributeNameForProperty` were overridden such that this was not the + // case. let attr = this.__dataAttributes[property]; if (!attr) { attr = this.constructor.attributeNameForProperty(property);