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): check type of __ob__ in isRaw and isReactive #732

Merged
merged 1 commit into from Jun 17, 2021

Conversation

Djaler
Copy link
Contributor

@Djaler Djaler commented Jun 16, 2021

fixes #715

We should check the type of __ob__ because in some cases it may be not an expected object, but, for example, a mock function, so the fact that Boolean(!__ob__.__raw__) === true does not necessarily indicate that the object is reactive

Copy link
Member

@pikax pikax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@Djaler
Copy link
Contributor Author

Djaler commented Jun 17, 2021

BTW, this problem is not present in Vue 3, so you can treat this PR as behavior alignment with vue-next)

@antfu antfu merged commit 97dd671 into vuejs:master Jun 17, 2021
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.

Incorrect check isReactive for Proxy objects
3 participants