when watch Array newValue and oldValue is incorrect
Version
3.0.1
Reproduction link
https://jsfiddle.net/v51bpjek/4/
Steps to reproduce
like code bellow
this.arr = [1, 2, 3, 4, 5];
this.$watch(
'arr',
(n, o) => {
console.log(n);
console.log(o);
},
{
deep: true,
},
);
this.arr.push(6)
What is expected?
when arr changed , n !== o
like this this.arr.push(6)
What is actually happening?
n===o
when use like push
splice
method