@@ -137,12 +137,12 @@ export default class SlotWrapper extends Wrapper {
137
137
block . render_listeners ( `_${ slot . name } ` ) ;
138
138
block . event_listeners = listeners ;
139
139
140
- if ( block . chunks . create ) create . push ( b `if (!${ slot } ) { ${ block . chunks . create } }` ) ;
141
- if ( block . chunks . claim ) claim . push ( b `if (!${ slot } ) { ${ block . chunks . claim } }` ) ;
142
- if ( block . chunks . hydrate ) hydrate . push ( b `if (!${ slot } ) { ${ block . chunks . hydrate } }` ) ;
143
- if ( block . chunks . mount ) mount . push ( b `if (!${ slot } ) { ${ block . chunks . mount } }` ) ;
144
- if ( block . chunks . update ) update . push ( b `if (!${ slot } ) { ${ block . chunks . update } }` ) ;
145
- if ( block . chunks . destroy ) destroy . push ( b `if (!${ slot } ) { ${ block . chunks . destroy } }` ) ;
140
+ if ( block . chunks . create . length ) create . push ( b `if (!${ slot } ) { ${ block . chunks . create } }` ) ;
141
+ if ( block . chunks . claim . length ) claim . push ( b `if (!${ slot } ) { ${ block . chunks . claim } }` ) ;
142
+ if ( block . chunks . hydrate . length ) hydrate . push ( b `if (!${ slot } ) { ${ block . chunks . hydrate } }` ) ;
143
+ if ( block . chunks . mount . length ) mount . push ( b `if (!${ slot } ) { ${ block . chunks . mount } }` ) ;
144
+ if ( block . chunks . update . length ) update . push ( b `if (!${ slot } ) { ${ block . chunks . update } }` ) ;
145
+ if ( block . chunks . destroy . length ) destroy . push ( b `if (!${ slot } ) { ${ block . chunks . destroy } }` ) ;
146
146
147
147
block . chunks . create = create ;
148
148
block . chunks . claim = claim ;
@@ -155,9 +155,11 @@ export default class SlotWrapper extends Wrapper {
155
155
b `if (${ slot } ) ${ slot } .c();`
156
156
) ;
157
157
158
- block . chunks . claim . push (
159
- b `if (${ slot } ) ${ slot } .l(${ parent_nodes } );`
160
- ) ;
158
+ if ( renderer . options . hydratable ) {
159
+ block . chunks . claim . push (
160
+ b `if (${ slot } ) ${ slot } .l(${ parent_nodes } );`
161
+ ) ;
162
+ }
161
163
162
164
block . chunks . mount . push ( b `
163
165
if (${ slot } ) {
0 commit comments