@@ -79,7 +79,7 @@ function connectedCallback() {
7979 this . _vdom = h (
8080 ContextProvider ,
8181 { ...this . _props , context } ,
82- toVdom ( this , true , this . _vdomComponent )
82+ toVdom ( this , this . _vdomComponent )
8383 ) ;
8484 ( this . hasAttribute ( 'hydrate' ) ? hydrate : render ) ( this . _vdom , this . _root ) ;
8585}
@@ -126,7 +126,7 @@ function Slot(props, context) {
126126 return h ( 'slot' , { ...props , ref } ) ;
127127}
128128
129- function toVdom ( element , wrap , nodeName ) {
129+ function toVdom ( element , nodeName ) {
130130 if ( element . nodeType === 3 ) return element . data ;
131131 if ( element . nodeType !== 1 ) return null ;
132132 let children = [ ] ,
@@ -142,7 +142,7 @@ function toVdom(element, wrap, nodeName) {
142142 }
143143
144144 for ( i = cn . length ; i -- ; ) {
145- const vnode = toVdom ( cn [ i ] , false ) ;
145+ const vnode = toVdom ( cn [ i ] , null ) ;
146146 // Move slots correctly
147147 const name = cn [ i ] . slot ;
148148 if ( name ) {
@@ -153,6 +153,6 @@ function toVdom(element, wrap, nodeName) {
153153 }
154154
155155 // 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 ;
157157 return h ( nodeName || element . nodeName . toLowerCase ( ) , props , wrappedChildren ) ;
158158}
0 commit comments