Skip to content

Commit

Permalink
refactor(engine): more clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
caridy committed May 12, 2022
1 parent 6b0bdda commit bb02d34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@lwc/engine-dom/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ export function nextSibling(node: Node): Node | null {
return node.nextSibling;
}

export function attachShadow(element: Element, options: ShadowRootInit): ShadowRoot {
const internals = (element as any).attachInternals?.();
export function attachShadow(element: HTMLElement, options: ShadowRootInit): ShadowRoot {
const internals = element.attachInternals?.();
return internals?.shadowRoot || element.shadowRoot || element.attachShadow(options);
}

Expand Down

0 comments on commit bb02d34

Please sign in to comment.