Skip to content

Object ownership: Invalid mutation for Linked class when using set/getContext #15532

Closed
@henrykrinkle01

Description

@henrykrinkle01

Describe the bug

This is a follow-up of the issue #15164, which has been fixed by the PR #15166.
I have a Linked class and a linked function which does the same thing.
Both objects created by the class and the function are passed to a child component using the context API.
In the child component, mutating the object created by the class produces an ownership_invalid_mutation warning while the function version is fine.

Reproduction

https://svelte.dev/playground/ccf69c3f620a402eadb39b0715a5976b?version=5.23.0

Logs

System Info

N/A

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