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

fix(reactivity): ensure add/set on reactive collections return the proxy (fix: #2530) #2534

Merged
merged 1 commit into from
Nov 27, 2020

Conversation

LinusBorg
Copy link
Member

@LinusBorg LinusBorg commented Oct 31, 2020

We currently return the raw target instead of the proxy on the following calls:

reactive(new Map()).set('a', 'a')
reactive(new WeakMap()).set({}, 'a')
reactive(new Map()).add('a')
reactive(new WeakMap()).add({})

This fix now returns the proxy

close: #2530

@LinusBorg LinusBorg changed the title fix(reactivity): ensure add/set on reactive collections return the proxy fix(reactivity): ensure add/set on reactive collections return the proxy (fix: #2530) Oct 31, 2020
@github-actions
Copy link

Size report

Path Size
vue.global.prod.js 40.15 KB (+0.02% 🔺)
runtime-dom.global.prod.js 26.43 KB (+0.02% 🔺)
size-check.global.prod.js 15.95 KB (+0.03% 🔺)

@yyx990803 yyx990803 merged commit 6e46a57 into master Nov 27, 2020
@yyx990803 yyx990803 deleted the linusborg/fix-map-set-return-2530 branch November 27, 2020 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collections add/set exposes raw target
2 participants