@@ -79,7 +79,7 @@ function connectedCallback() {
79
79
this . _vdom = h (
80
80
ContextProvider ,
81
81
{ ...this . _props , context } ,
82
- toVdom ( this , true , this . _vdomComponent )
82
+ toVdom ( this , this . _vdomComponent )
83
83
) ;
84
84
( this . hasAttribute ( 'hydrate' ) ? hydrate : render ) ( this . _vdom , this . _root ) ;
85
85
}
@@ -126,7 +126,7 @@ function Slot(props, context) {
126
126
return h ( 'slot' , { ...props , ref } ) ;
127
127
}
128
128
129
- function toVdom ( element , wrap , nodeName ) {
129
+ function toVdom ( element , nodeName ) {
130
130
if ( element . nodeType === 3 ) return element . data ;
131
131
if ( element . nodeType !== 1 ) return null ;
132
132
let children = [ ] ,
@@ -142,7 +142,7 @@ function toVdom(element, wrap, nodeName) {
142
142
}
143
143
144
144
for ( i = cn . length ; i -- ; ) {
145
- const vnode = toVdom ( cn [ i ] , false ) ;
145
+ const vnode = toVdom ( cn [ i ] , null ) ;
146
146
// Move slots correctly
147
147
const name = cn [ i ] . slot ;
148
148
if ( name ) {
@@ -153,6 +153,6 @@ function toVdom(element, wrap, nodeName) {
153
153
}
154
154
155
155
// Only wrap the topmost node with a slot
156
- const wrappedChildren = wrap ? h ( Slot , null , children ) : children ;
156
+ const wrappedChildren = nodeName ? h ( Slot , null , children ) : children ;
157
157
return h ( nodeName || element . nodeName . toLowerCase ( ) , props , wrappedChildren ) ;
158
158
}
0 commit comments