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

[@vue/reactivity] Proxied values are unwrapped during insertion into reactive sets, but not deletion #597

Closed
nmsmith opened this issue Jan 9, 2020 · 1 comment

Comments

@nmsmith
Copy link

nmsmith commented Jan 9, 2020

Version

3.0.0-alpha.0

Reproduction link

https://jsfiddle.net/bn08c9rL/2/

Steps to reproduce

  1. Create a reactive() object.
  2. Create a reactive() set.
  3. add() the reactive object to the set.
  4. Attempt to delete() the reactive object from the set. The item is not deleted.

What is expected?

The item should be deleted from the set.

What is actually happening?

The item is not deleted from the set.

@nmsmith nmsmith changed the title [vue-reactivity] Proxied values are unwrapped during insertion into reactive sets, but not deletion [@vue/reactivity] Proxied values are unwrapped during insertion into reactive sets, but not deletion Jan 9, 2020
@nmsmith
Copy link
Author

nmsmith commented Jan 9, 2020

In collectionHandlers.ts, the add() function seems to unwrap the "value" before insertion, but the deleteEntry() does not unwrap the "key" (which for sets, is also the value). The issue may be caused by this asymmetrical handling: it seems these functions are supposed to be generic over both Sets and Maps?

underfin added a commit to underfin/vue-next that referenced this issue Jan 9, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Nov 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant