Skip to content

Duplicate key error shows whole item instead of key when destructuring a tuple #14146

@brunnerh

Description

@brunnerh

Describe the bug

It should probably output only the key.

Reproduction

<script>
	const items = [
		[0, 'A', 1],
		[0, 'B', 2],
		[0, 'C', 3],
	]
</script>

{#each items as [id, value, other] (id)}
	<div>{item.value}</div>
{/each}

each_key_duplicate Keyed each block has duplicate key `0,B,2` at indexes 0 and 1 in App.svelte

Playground

Logs

No response

System Info

Playground

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