Skip to content

Spreading in the template isn't a potentially reactive operation #13922

@7nik

Description

@7nik

Describe the bug

<span>{ [...array] }</span>

is compiled as static text when the variable isn't marked as reactive.

Though I doubt people use it in the prod (at least it should be array.join(", ")), they can do it during development.

Reproduction

REPL

Logs

No response

System Info

Svelte 5.1.2

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