Skip to content

Commit 585eabe

Browse files
committed
fix(custom-element): prevent injecting child styles if shadowRoot is false
1 parent 2921685 commit 585eabe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/runtime-dom/src/apiCustomElement.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,9 @@ export class VueElement
661661
* @internal
662662
*/
663663
_injectChildStyle(comp: ConcreteComponent & CustomElementOptions): void {
664-
this._applyStyles(comp.styles, comp)
664+
if (this._def.shadowRoot !== false) {
665+
this._applyStyles(comp.styles, comp)
666+
}
665667
}
666668

667669
/**

0 commit comments

Comments
 (0)