From 688243b32db862d053613733c6463962080db3a0 Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Wed, 29 Jan 2020 18:15:28 -0800 Subject: [PATCH] Copy flag to a single location rather than two. --- lib/legacy/legacy-element-mixin.js | 3 +-- lib/legacy/polymer-fn.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/legacy/legacy-element-mixin.js b/lib/legacy/legacy-element-mixin.js index e06b371ae7..67276c92f6 100644 --- a/lib/legacy/legacy-element-mixin.js +++ b/lib/legacy/legacy-element-mixin.js @@ -168,8 +168,7 @@ export const LegacyElementMixin = dedupingMixin((base) => { // NOTE: Inlined for perf from version of DisableUpgradeMixin. static get observedAttributes() { - if (legacyNoObservedAttributes && !this._legacyForceObservedAttributes) { - this.prototype._legacyForceObservedAttributes = this._legacyForceObservedAttributes; + if (legacyNoObservedAttributes && !this.prototype._legacyForceObservedAttributes) { // Ensure this element is property registered with the telemetry system. if (!this.hasOwnProperty(JSCompiler_renameProperty('__observedAttributes', this))) { this.__observedAttributes = []; diff --git a/lib/legacy/polymer-fn.js b/lib/legacy/polymer-fn.js index 4ca4511e50..f5da53cb8a 100644 --- a/lib/legacy/polymer-fn.js +++ b/lib/legacy/polymer-fn.js @@ -41,7 +41,7 @@ const Polymer = function(info) { } // Copy opt out for `legacyNoObservedAttributes` from info object to class. if (info._legacyForceObservedAttributes) { - klass._legacyForceObservedAttributes = info._legacyForceObservedAttributes; + klass.prototype._legacyForceObservedAttributes = info._legacyForceObservedAttributes; } customElements.define(klass.is, /** @type {!HTMLElement} */(klass)); return klass;