From 2bb488c83085c56313b9b971c27894468c10d79c Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Fri, 26 Jul 2019 11:33:36 -0700 Subject: [PATCH] closure fixes --- lib/mixins/disable-upgrade-mixin.js | 6 ++++++ lib/mixins/element-mixin.js | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/mixins/disable-upgrade-mixin.js b/lib/mixins/disable-upgrade-mixin.js index 222a2b6728..868cfc49d2 100644 --- a/lib/mixins/disable-upgrade-mixin.js +++ b/lib/mixins/disable-upgrade-mixin.js @@ -76,6 +76,12 @@ export const DisableUpgradeMixin = dedupingMixin((base) => { */ class DisableUpgradeClass extends superClass { + constructor() { + super(); + /** @type {boolean|undefined} */ + this.__isUpgradeDisabled; + } + static get observedAttributes() { return observedAttributesGetter.call(this).concat(DISABLED_ATTR); } diff --git a/lib/mixins/element-mixin.js b/lib/mixins/element-mixin.js index 74205e1fb7..026e540c6b 100644 --- a/lib/mixins/element-mixin.js +++ b/lib/mixins/element-mixin.js @@ -578,12 +578,12 @@ export const ElementMixin = dedupingMixin(base => { } /** + * Determines if a property dfeault can be applied. For example, this + * prevents a default from being applied when a property that has no + * accessor is overridden by its host before upgrade (e.g. via a binding). * @param {string} property Name of the property * @returns {boolean} Returns true if the property default can be applied. */ - // A property default can be overridden when a `properties` property with - // default but no effects had a property set (e.g. bound) by its host - // before upgrade. _canApplyPropertyDefault(property) { return !this.hasOwnProperty(property); }