Vue.js v2.0.0-alpha.5
https://jsbin.com/xedizivigi/edit?html,js,console,output
First read 'bar.car.log', then assign bar.car.log = 'baoma'
foo object will not update
foo object will also be updated
Hi @douzi8,
I have checked your bin and the foo object remains the same as expected.
Interesting, looks like a bug to me.
It is working as expected, bar.car.log gets a new value assigned and foo.car.log is not changed.
Before assignment we have:
foo.car.log => 'benchi'
bar.car.log => 'benchi'
After assignment:
foo.car.log => 'benchi'
bar.car.log => 'baoma'
@ealves-pt but update is still called for foo, which should not be happening.
@simplesmiler hmmm indeed didn't noticed that. Interesting...
Edit: Just noticed that if we use a computed property on both components it works as expected.
Most helpful comment
@ealves-pt but
updateis still called forfoo, which should not be happening.