Skip to content

Commit

Permalink
fix(engine): more PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
caridy committed Apr 26, 2022
1 parent 6c7aa74 commit 1767902
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/@lwc/engine-core/src/framework/vm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export interface VM<N = HostNode, E = HostElement> {
shadowMode: ShadowMode;
/** Transitive support for native Shadow DOM. A component in native mode
* transitively opts all of its descendants into native. */
readonly nearestSRMode: ShadowMode | null;
readonly nearestShadowMode: ShadowMode | null;
/** The component creation index. */
idx: number;
/** Component state, analogous to Element.isConnected */
Expand Down Expand Up @@ -289,7 +289,7 @@ export function createVM<HostNode, HostElement>(

renderMode: def.renderMode,
shadowMode: computeShadowMode(def, owner),
nearestSRMode: owner?.shadowRoot ? owner.shadowMode : owner?.nearestSRMode ?? null,
nearestShadowMode: owner?.shadowRoot ? owner.shadowMode : owner?.nearestShadowMode ?? null,

context: {
stylesheetToken: undefined,
Expand Down Expand Up @@ -355,7 +355,7 @@ function computeShadowMode(def: ComponentDef, owner: VM | null) {
// transitively opts all of its descendants into native.
// Synthetic if neither this component nor any of its ancestors are configured
// to be native.
shadowMode = owner?.nearestSRMode ?? ShadowMode.Synthetic;
shadowMode = owner?.nearestShadowMode ?? ShadowMode.Synthetic;
}
} else {
shadowMode = ShadowMode.Synthetic;
Expand Down

0 comments on commit 1767902

Please sign in to comment.