mirror of https://github.com/sveltejs/svelte
fix: deduplicate children prop from default slot (#10800)
* feat: provide isSnippet type, deduplicate children prop from default slot fixes #10790 part of #9774 * fix ce bug * remove isSnippet type, adjust test * fix types * revert unrelated changes * remove changeset * enhance test * fix * fix * fix * fix, different approach without needing symbol --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>pull/11617/head
parent
cac8630de6
commit
4365562228
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"svelte": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: deduplicate children prop and default slot
|
@ -0,0 +1,6 @@
|
|||||||
|
<script>
|
||||||
|
export let children;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{children}
|
||||||
|
<slot />
|
@ -0,0 +1,5 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
html: `foo bar foo`
|
||||||
|
});
|
@ -0,0 +1,9 @@
|
|||||||
|
<script>
|
||||||
|
import A from "./A.svelte";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<A children="foo">
|
||||||
|
bar
|
||||||
|
</A>
|
||||||
|
|
||||||
|
<A children="foo" />
|
Loading…
Reference in new issue