-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Open
Description
Version
2.5.17-beta.0
Reproduction link
https://jsfiddle.net/L6pey1ts/22/
Steps to reproduce
Run JSFiddle snippet
What is expected?
I expect, that the program only outputs 2,3,5,7,11,13
(when executing arr.push(13)
).
What is actually happening?
(empty line)
2,3,5,7,11
arr.abc changed
arr.def
(empty line)
2,3,5,7,11,13
(empty line)
arr.def changed
abc is already existed on arr when app is initializing, and it is neglected for it was defined on an array.
def is set by Vue.set(), but it executes defineReactive(arr, 'def', 'arr.def') (src/core/observer/index.js line:225), and notifies the watchers.
Vue.set() should be consistent when dealing with them. In my mind, both of them should be neglected.
Metadata
Metadata
Assignees
Labels
No labels