mirror of https://github.com/sveltejs/svelte
fix: improve validation error that occurs when using `{@render ...}` to render default slotted content (#12521)
* add invalid_default_snippet error message * fix: improve validation error that occurs when using `{@render ...}` to render default slotted content * cheeky hack to keep treeshakeability until we can nuke this validation altogetherpull/12515/head
parent
0891fa7a18
commit
ff080cbbdc
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: improve validation error that occurs when using `{@render ...}` to render default slotted content
|
@ -0,0 +1,8 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
compileOptions: {
|
||||
dev: true
|
||||
},
|
||||
runtime_error: 'invalid_default_snippet'
|
||||
});
|
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
let { children: x } = $props();
|
||||
</script>
|
||||
|
||||
{@render x(true)}
|
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
import Inner from './inner.svelte';
|
||||
</script>
|
||||
|
||||
<Inner let:foo>
|
||||
{foo}
|
||||
</Inner>
|
Loading…
Reference in new issue