From 99b876497acc68613c4798eba69071ebad8898f5 Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Thu, 9 Jan 2020 10:36:18 -0800 Subject: [PATCH] Only auto-use disable-upgrade if legacyOptimizations is set. --- lib/legacy/legacy-element-mixin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/legacy/legacy-element-mixin.js b/lib/legacy/legacy-element-mixin.js index 53a4c18d59..a6c0575c3a 100644 --- a/lib/legacy/legacy-element-mixin.js +++ b/lib/legacy/legacy-element-mixin.js @@ -21,7 +21,7 @@ import { timeOut, microTask } from '../utils/async.js'; import { get } from '../utils/path.js'; import { wrap } from '../utils/wrap.js'; import { scopeSubtree } from '../utils/scope-subtree.js'; -import { legacyNoObservedAttributes } from '../utils/settings.js'; +import { legacyOptimizations, legacyNoObservedAttributes } from '../utils/settings.js'; import { findObservedAttributesGetter } from '../mixins/disable-upgrade-mixin.js'; const DISABLED_ATTR = 'disable-upgrade'; @@ -297,7 +297,8 @@ export const LegacyElementMixin = dedupingMixin((base) => { */ _initializeProperties() { // NOTE: Inlined for perf from version of DisableUpgradeMixin. - if (this.hasAttribute(DISABLED_ATTR)) { + // Only auto-use disable-upgrade if legacyOptimizations is set. + if (legacyOptimizations && this.hasAttribute(DISABLED_ATTR)) { this.__isUpgradeDisabled = true; } else { let proto = Object.getPrototypeOf(this);