Skip to content

Svelte 5: scope is borked with slots and static props #9823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Rich-Harris opened this issue Dec 7, 2023 · 0 comments · Fixed by #9824
Closed

Svelte 5: scope is borked with slots and static props #9823

Rich-Harris opened this issue Dec 7, 2023 · 0 comments · Fixed by #9824

Comments

@Rich-Harris
Copy link
Member

Describe the bug

We set the child scope on the component node, for convenience, but that breaks when you combine slot props with static props of the same name:

<script>
	import Child from './Child.svelte';
	
	let thing = 'hello';
</script>

<Child thing={thing} let:thing>
	<p>thing: {thing}</p>
</Child>

Reproduction

https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAE42PQQrCMBBFrzIEoQrS7GNaEI9hXUib2kDaDMlUkNK7m6RVF7pwEZKfmf_nzcRabZRn4jyx4dorJtgRke0ZPTAKf1eGVNDejq6OP9LXTiOV1VCR7tE6glOnTQOtsz1kOU8qX4zZIbbFYxQBdXq4QQFZp4yxsSb5J22QS07qKqZ0zRB8Ij3TQIllEgLWuuRYxphkLQNnbxvdatUwQW5U8_69Vur4d7FIO628cyDeoLPot7svZG8svViA_wC4zE-YD5-CYwEAAA==

Logs

No response

System Info

next

Severity

annoyance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant