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

For the reactive of the collection, the results are inconsistent when assigning shallow and readonly during value fetching. #11249

Closed
liuseen-l opened this issue Jun 28, 2024 · 0 comments · Fixed by #8503

Comments

@liuseen-l
Copy link
Contributor

liuseen-l commented Jun 28, 2024

Vue version

3.4.31

Link to minimal reproduction

https://play.vuejs.org/#eNp9UltLwzAU/iuHvKyF0iH6NKag4oOCF9THvGTd2ZaZJiFJt0npf/c0XetgF/rSfN/Jd0lSs3tr802FbMKmvnDSBvAYKnvHtSytcQFqcCiKIDeYgV8Jpcz2cwCImhutfiGT/qsjM5CeBiLcwMKZEkZkMOK6/QqjfYBSWLgddBONW3gVNklTronKKUEyWhgzOnJMagETuGrSFDotozBXZpkM9kkrsOwFUhocj2EhlMfWflCfCUfqffyknp2T7atc1u2Lmdn6sFjdUCPCckHocZUJOZ6rEXd1LsFVe5MWnHUG+9wnNYbMcf5QZDruLpmulxYBS6tEQFpNx8MCWMaCJ8WFXOZrbzS9jZprAM4KU1qp0L3bIMmRswlEpuVi7JeItV5ZjxcrLH5O4Gu/azHOPhx6dBvkbOCCcHTUHf309YY7+h/I0swrRdMXyE+k06jajN3YQ6XnFPtgLqZ9ji9c6uW3f9oF1L4v1R0WQBPnOaP3+3ih+n/c6/wm7uO6Yc0foLQkqA==

Steps to reproduce

https://play.vuejs.org/#eNp9UltLwzAU/iuHvKyF0iH6NKag4oOCF9THvGTd2ZaZJiFJt0npf/c0XetgF/rSfN/Jd0lSs3tr802FbMKmvnDSBvAYKnvHtSytcQFqcCiKIDeYgV8Jpcz2cwCImhutfiGT/qsjM5CeBiLcwMKZEkZkMOK6/QqjfYBSWLgddBONW3gVNklTronKKUEyWhgzOnJMagETuGrSFDotozBXZpkM9kkrsOwFUhocj2EhlMfWflCfCUfqffyknp2T7atc1u2Lmdn6sFjdUCPCckHocZUJOZ6rEXd1LsFVe5MWnHUG+9wnNYbMcf5QZDruLpmulxYBS6tEQFpNx8MCWMaCJ8WFXOZrbzS9jZprAM4KU1qp0L3bIMmRswlEpuVi7JeItV5ZjxcrLH5O4Gu/azHOPhx6dBvkbOCCcHTUHf309YY7+h/I0swrRdMXyE+k06jajN3YQ6XnFPtgLqZ9ji9c6uW3f9oF1L4v1R0WQBPnOaP3+3ih+n/c6/wm7uO6Yc0foLQkqA==

What is expected?

const map = reactive(new Map())
map.set('foo', shallowReactive({a : 1})) 
console.log(isShallow(map.get('foo'))) true

map.set('bar', readonly({b : 1})) 
console.log(isReadonly(map.get('foo'))) true

What is actually happening?

const map = reactive(new Map())
map.set('foo', shallowReactive({a : 1})) 
console.log(isShallow(map.get('foo'))) false

map.set('bar', readonly({b : 1})) 
console.log(isReadonly(map.get('foo'))) false

System Info

No response

Any additional comments?

No response

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant