mirror of https://github.com/sveltejs/svelte
fix: correctly apply scope on component children (#9824)
Co-authored-by: Rich Harris <rich.harris@vercel.com>pull/9825/head
parent
5797bb34ce
commit
481df0e64a
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: correctly apply scope on component children
|
@ -0,0 +1,5 @@
|
|||||||
|
<script>
|
||||||
|
let { message } = $props();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<slot {message} />
|
@ -0,0 +1,5 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
html: `<p>message: hello</p>`
|
||||||
|
});
|
@ -0,0 +1,9 @@
|
|||||||
|
<script>
|
||||||
|
import Child from './Child.svelte';
|
||||||
|
|
||||||
|
let message = 'hello';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<Child message={message} let:message>
|
||||||
|
<p>message: {message}</p>
|
||||||
|
</Child>
|
Loading…
Reference in new issue