-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
When accessing the hasOwnProperty method of the array, the key cannot be tracked #10455
Labels
Comments
+ delete array[0]
watchSyncEffect(() => {
console.log(array.hasOwnProperty(0))
})
- delete array[0] Or - watchSyncEffect
+ watchPostEffect |
that's not a solution to the issue ... |
@LinusBorg Do you also think this is a bug? |
Probably, yes. |
const array = reactive([1, 2, 3]) The above example will not trigger the effect. |
lynxlangya
pushed a commit
to lynxlangya/core
that referenced
this issue
May 30, 2024
…string value close vuejs#10455 close vuejs#10464
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Vue version
3.3.6
Link to minimal reproduction
https://play.vuejs.org/#eNp9kVFrwjAQx7/KkZdVKFXn2IOosA0ftocpc29GRomnrWuTkFyrIv3uu7boZAwfAsn9/3f53d1JPFkblQWKoRh55VJL4JEKO5E6za1xBCdwGCtKSwxhH5NKFketppsNKoIKNs7kcMcF7qSWWhntCWLn4iOML3nBsh/CfQiDVUfqPyWCoAPjCZykBqizTYZRZrZBUyNKYj/b67kzFh0dg16HC1R8pF5jhoTtV8veSupRt8VncH4Q5jaLCfkFMEr6E0JPoy5faueVKkJBnj/epNto543mOTQsUiiT2zRDN7OUMpgUw5ay1uIsM/u3JkauwPAcVwmq73/iO3+oY1LMHXp0JUpx0Sh2W6RWni7e8cD3i5ibdZGx+4b4gTy0omZsbc+FXjP2la+hfW22mertp58eCLU/N1WD1s6q8UvBu3y50fov7iB6aPJ4JTzFrxJdXZMHOIgG0aOofgANZsmX
Steps to reproduce
const array = reactive([1, 2, 3])
watchSyncEffect(() => {
console.log(array.hasOwnProperty(0))
})
delete array[0]
What is expected?
The side effect function should be executed twice
// true
// false
What is actually happening?
The side effect function was only executed once
// true
System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: