File tree 2 files changed +6
-4
lines changed 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ import { isAsyncWrapper } from './apiAsyncComponent'
86
86
import { isCompatEnabled } from './compat/compatConfig'
87
87
import { DeprecationTypes } from './compat/compatConfig'
88
88
import type { TransitionHooks } from './components/BaseTransition'
89
+ import type { VueElement } from '@vue/runtime-dom'
89
90
90
91
export interface Renderer < HostElement = RendererElement > {
91
92
render : RootRenderFunction < HostElement >
@@ -1348,7 +1349,10 @@ function baseCreateRenderer(
1348
1349
} else {
1349
1350
// custom element style injection
1350
1351
if ( root . ce ) {
1351
- root . ce . _injectChildStyle ( type )
1352
+ // @ts -expect-error _def is private
1353
+ if ( ( root . ce as VueElement ) . _def . shadowRoot !== false ) {
1354
+ root . ce . _injectChildStyle ( type )
1355
+ }
1352
1356
}
1353
1357
1354
1358
if ( __DEV__ ) {
Original file line number Diff line number Diff line change @@ -661,9 +661,7 @@ export class VueElement
661
661
* @internal
662
662
*/
663
663
_injectChildStyle ( comp : ConcreteComponent & CustomElementOptions ) : void {
664
- if ( this . _def . shadowRoot !== false ) {
665
- this . _applyStyles ( comp . styles , comp )
666
- }
664
+ this . _applyStyles ( comp . styles , comp )
667
665
}
668
666
669
667
/**
You can’t perform that action at this time.
0 commit comments