Skip to content

Collections add/set exposes raw target #2530

@jods4

Description

@jods4

Version

3.0.2

Reproduction link

https://jsfiddle.net/v9k3jmog/

Steps to reproduce

Call Set::add or Map::set.
Those methods are specified to return the collection itself, so they can be chained: set.add(1).add(2).add(3).

What is expected?

Those methods should return the reactive collection so that set.add(1) === set is true and reactivity works when chaining.

What is actually happening?

Those methods return the raw collection, breaking the collections contracts and breaking reactivity.


I pointed a few other things that are less clear-cut bugs but probably not desirable behaviors (e.g. observable differences between reactive and non-reactive collections behaviors) here:
50adc01

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't workinghas PRA pull request has already been submitted to solve the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions