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

reactive __proto__ will broken reactive system #1107

Closed
xinpingwang opened this issue May 3, 2020 · 1 comment
Closed

reactive __proto__ will broken reactive system #1107

xinpingwang opened this issue May 3, 2020 · 1 comment

Comments

@xinpingwang
Copy link
Contributor

Version

3.0.0-beta.7

Reproduction link

https://github.com/xinpingwang/vue-next/tree/reactive-proto

Steps to reproduce

  1. git clone https://github.com/xinpingwang/vue-next.git -b reactive-proto
  2. yarn install && yarn run test reactivity

What is expected?

all test pass

What is actually happening?

reactive.spec failed


when read a prop of a reactive object, the reactive system will reactive object[prop] too. and add ReactiveFlags.reactive(eg: __v_reactive) to object[prop], see. then, when next call to reactive object[prop], object[prop].__v_reactive will returned.

when this prop is __proto__, the ReactiveFlags.reactive will add to Object, then reactive all object will returen Object.__proto__.__v_reactive

this issue is caused by the new commit: refactor(reactivity): use more efficient reactive checks

solutions to solve this issue may be add __proto__ to reactive black list or check isReactive before return.

@sionzee
Copy link

sionzee commented May 4, 2020

This should be deployed ASAP, beta7 is unusable because of this.
I have got thousands errors.

In meantime downgraded to beta6.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 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

2 participants