@@ -11,7 +11,7 @@ import { addErrorComponentStack } from '../shared/error';
1111import { evaluateTemplate , setVMBeingRendered , getVMBeingRendered } from './template' ;
1212import { runWithBoundaryProtection } from './vm' ;
1313import { logOperationStart , logOperationEnd , OperationId } from './profiler' ;
14- import { LightningElement } from './base-lightning-element' ;
14+ import type { LightningElement } from './base-lightning-element' ;
1515import type { Template } from './template' ;
1616import type { VM } from './vm' ;
1717import type { LightningElementConstructor } from './base-lightning-element' ;
@@ -58,9 +58,11 @@ export function invokeComponentConstructor(vm: VM, Ctor: LightningElementConstru
5858 // the "instanceof" operator would not work here since Locker Service provides its own
5959 // implementation of LightningElement, so we indirectly check if the base constructor is
6060 // invoked by accessing the component on the vm.
61- const isInvalidConstructor = lwcRuntimeFlags . LEGACY_LOCKER_ENABLED
62- ? vmBeingConstructed . component !== result
63- : ! ( result instanceof LightningElement ) ;
61+ // TODO [W-17769475]: Restore this fix when we can reliably detect Locker enabled
62+ // const isInvalidConstructor = lwcRuntimeFlags.LEGACY_LOCKER_ENABLED
63+ // ? vmBeingConstructed.component !== result
64+ // : !(result instanceof LightningElement);
65+ const isInvalidConstructor = vmBeingConstructed . component !== result ;
6466
6567 if ( isInvalidConstructor ) {
6668 throw new TypeError (
0 commit comments