Skip to content

Commit 99b8764

Browse files
author
Steven Orvell
committed
Only auto-use disable-upgrade if legacyOptimizations is set.
1 parent a4b4723 commit 99b8764

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/legacy/legacy-element-mixin.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { timeOut, microTask } from '../utils/async.js';
2121
import { get } from '../utils/path.js';
2222
import { wrap } from '../utils/wrap.js';
2323
import { scopeSubtree } from '../utils/scope-subtree.js';
24-
import { legacyNoObservedAttributes } from '../utils/settings.js';
24+
import { legacyOptimizations, legacyNoObservedAttributes } from '../utils/settings.js';
2525
import { findObservedAttributesGetter } from '../mixins/disable-upgrade-mixin.js';
2626

2727
const DISABLED_ATTR = 'disable-upgrade';
@@ -297,7 +297,8 @@ export const LegacyElementMixin = dedupingMixin((base) => {
297297
*/
298298
_initializeProperties() {
299299
// NOTE: Inlined for perf from version of DisableUpgradeMixin.
300-
if (this.hasAttribute(DISABLED_ATTR)) {
300+
// Only auto-use disable-upgrade if legacyOptimizations is set.
301+
if (legacyOptimizations && this.hasAttribute(DISABLED_ATTR)) {
301302
this.__isUpgradeDisabled = true;
302303
} else {
303304
let proto = Object.getPrototypeOf(this);

0 commit comments

Comments
 (0)