File tree 4 files changed +13
-1
lines changed
src/compile/render-dom/wrappers/shared
test/runtime/samples/component-slot-empty-b
4 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export default function create_debugging_comment(
16
16
let d ;
17
17
18
18
if ( node . type === 'InlineComponent' || node . type === 'Element' ) {
19
- d = node . children [ 0 ] . start ;
19
+ d = node . children . length ? node . children [ 0 ] . start : node . start ;
20
20
while ( source [ d - 1 ] !== '>' ) d -= 1 ;
21
21
} else {
22
22
d = node . expression ? node . expression . node . end : c ;
Original file line number Diff line number Diff line change
1
+ <div >
2
+ <slot name =" slot1" />
3
+ </div >
Original file line number Diff line number Diff line change
1
+ export default {
2
+ html : `<div><input slot="slot1"></div>`
3
+ } ;
Original file line number Diff line number Diff line change
1
+ <script >
2
+ import Nested from " ./Nested.svelte" ;
3
+ </script >
4
+ <Nested >
5
+ <input slot =" slot1" >
6
+ </Nested >
You can’t perform that action at this time.
0 commit comments