Skip to content

Commit

Permalink
Copy flag to a single location rather than two.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Orvell committed Jan 30, 2020
1 parent 3fd9671 commit 688243b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/legacy/legacy-element-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down
2 changes: 1 addition & 1 deletion lib/legacy/polymer-fn.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 688243b

Please sign in to comment.