-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
Clicking on push and then pop will trigger Uncaught TypeError: Cannot read properties of undefined (reading 'id')
<script>
let numbers = $state([{id: 1}, {id: 2}, {id: 3}]);
</script>
<button onclick={() => numbers.push({id: numbers.length + 1})}>
push
</button>
<button onclick={() => numbers.pop()}>
pop
</button>
{#each numbers as number}
<p>{number.id}</p>
{/each}Reproduction
Logs
No response
System Info
svelte-5-preview.vercel.appSeverity
blocking all usage of svelte
Metadata
Metadata
Assignees
Labels
No labels