Skip to content

Regression @1.56: Click-handler inside #each with array-literal #1217

@aphitiel

Description

@aphitiel

This

{{#each [1,2,3] as i}}
	<button on:click="console.log(i)">{{i}}</button>
{{/each}}

worked in 1.55.1. After that, clicking a button throws

Uncaught TypeError: Cannot read property '1' of undefined
at HTMLButtonElement.click_handler

because this._svelte.each_value is undefined.

REPL:

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