Skip to content

Svelte 5: compiler may falsy consider variable as non-reactive #9860

Closed
@7nik

Description

@7nik

Describe the bug

The compiler may consider the variable non-reactive if no explicit calls of methods. However, an object may have a custom stringification method that reads a signal. Such methods are toString, toJSON, valueOf, and Symbol.toPrimitive.

Reproduction

REPL

Logs

No response

System Info

REL Svelte v5.0.0-next.22

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