File tree 3 files changed +10
-5
lines changed
compiler/compile/render_dom
3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export default function dom(
20
20
block . has_outro_method = true ;
21
21
22
22
// prevent fragment being created twice (#1063)
23
- if ( options . customElement ) block . chunks . create . push ( b `this.c = @noop;` ) ;
23
+ //neek if (options.customElement) block.chunks.create.push(b`this.c = @noop;`);
24
24
25
25
const body = [ ] ;
26
26
@@ -453,7 +453,7 @@ export default function dom(
453
453
@insert(options.target, this, options.anchor);
454
454
}
455
455
456
- this.$$.slotted = {};
456
+ this.$$.slotted = options.slots || {};
457
457
${ ( props . length > 0 || uses_props ) && b `
458
458
for (const key in options.props.$$slots) {
459
459
this.$$.slotted[key] = options.props.$$slots[key][0]();
Original file line number Diff line number Diff line change @@ -400,11 +400,15 @@ export default class InlineComponentWrapper extends Wrapper {
400
400
) ;
401
401
}
402
402
403
+ /*if (component.compile_options.customElement) {
404
+ @insert (${parent_node || '#target'}, ${name}, ${parent_node ? 'null' : 'anchor'});
405
+ }
406
+ else {
407
+ @mount_component (${name}, ${parent_node || '#target'}, ${parent_node ? 'null' : 'anchor'});
408
+ }*/
403
409
block . chunks . mount . push ( b `
404
410
if (component.compile_options.customElement) {
405
- block.chunks.mount.push(
406
- @insert(${ parent_node || '#target' } , ${ name } , ${ parent_node ? 'null' : 'anchor' } );
407
- )
411
+ @insert(${ parent_node || '#target' } , ${ name } , ${ parent_node ? 'null' : 'anchor' } );
408
412
}
409
413
else if (${ name } ) {
410
414
@mount_component(${ name } , ${ parent_node || '#target' } , ${ parent_node ? 'null' : 'anchor' } );
Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ if (typeof HTMLElement === 'function') {
176
176
// @ts -ignore todo: improve typings
177
177
//this.appendChild(this.$$.slotted[key]);
178
178
this . $$ . slotted [ key ] . m ( this , null ) ;
179
+ //this.appendChild(this.$$.slotted[key].m(this, null));
179
180
}
180
181
}
181
182
You can’t perform that action at this time.
0 commit comments