mirror of https://github.com/sveltejs/svelte
allow slots to have missing props in SSR - fixes #3322
parent
1bb0728a5c
commit
07932da548
@ -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