Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collections add/set exposes raw target #2530

Closed
jods4 opened this issue Oct 30, 2020 · 1 comment · Fixed by #2534
Closed

Collections add/set exposes raw target #2530

jods4 opened this issue Oct 30, 2020 · 1 comment · Fixed by #2534
Labels
has PR A pull request has already been submitted to solve the issue 🐞 bug Something isn't working

Comments

@jods4
Copy link
Contributor

jods4 commented Oct 30, 2020

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

@LinusBorg LinusBorg added the 🐞 bug Something isn't working label Oct 31, 2020
@LinusBorg LinusBorg added the has PR A pull request has already been submitted to solve the issue label Oct 31, 2020
@LinusBorg
Copy link
Member

Added a PR for the reported problem.

Concerning your comments about the other details, I'd suggest to open a new issue (or several). The commits you commented on are a couple months old now, we might need a central place to discuss them.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has PR A pull request has already been submitted to solve the issue 🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants