Skip to content

Commit

Permalink
Only auto-use disable-upgrade if legacyOptimizations is set.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Orvell committed Jan 9, 2020
1 parent a4b4723 commit 99b8764
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/legacy/legacy-element-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 99b8764

Please sign in to comment.