Skip to content

From svelte >= 5.33.5 you can't destructure snippet parameters #16067

Closed
@hawk93

Description

@hawk93

Describe the bug

After updating from v5.33.1 to latest svelte version I saw my component that destructures snippet parameters broken. I figured out that this happened going from version 5.33.4 to 5.33.5.

This is a sample of the code that shows the error. In the broken version x is never printed

<script>
	let array = $state(['a', 'b', 'c'])
</script>

{#snippet content([x])}
	{x}
{/snippet}

{@render content(array)}

Reproduction

REPL with last working version 5.33.4

REPL with broken version 5.33.5

System Info

repl

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions