mirror of https://github.com/sveltejs/svelte
Merge pull request #3428 from sveltejs/gh-3322
allow slots to have missing props in SSRpull/3437/head
commit
ee1fa87c75
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
export let thing;
|
||||
</script>
|
||||
|
||||
<p>{thing}</p>
|
@ -0,0 +1 @@
|
||||
<slot></slot>
|
@ -0,0 +1,5 @@
|
||||
export default {
|
||||
html: `
|
||||
<p>undefined</p>
|
||||
`
|
||||
};
|
@ -0,0 +1,10 @@
|
||||
<script>
|
||||
import Foo from './Foo.svelte';
|
||||
import Bar from './Bar.svelte';
|
||||
|
||||
const things = { '1': 'one' };
|
||||
</script>
|
||||
|
||||
<Foo let:id>
|
||||
<Bar thing={things[id]}/>
|
||||
</Foo>
|
Loading…
Reference in new issue