Skip to content

SvelteSet.has, SvelteMap.get and SvelteMap.has aren't fine grain when parameter is not in the object #16961

@Thiagolino8

Description

@Thiagolino8

Describe the bug

When using the .get and .has methods, if the searched value does not exist within the object, the effect is triggered even if the returned value has not changed (false or undefined)
When the searched value exists within the object, the effect is triggered only when the result changes

Reproduction

While foo doesn't exist within the set, the hasFoo function is triggered with each new task created
After the foo task is created, the hasFoo function is no longer triggered
repl

Logs

System Info

running Svelte compiler version 5.40.1

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions