Vue: Multiple vue instance bug

Created on 22 Jun 2016  ·  5Comments  ·  Source: vuejs/vue

Vue.js version

Vue.js v2.0.0-alpha.5

Reproduction Link

https://jsbin.com/xedizivigi/edit?html,js,console,output

Steps to reproduce

First read 'bar.car.log', then assign bar.car.log = 'baoma'

What is Expected?

foo object will not update

What is actually happening?

foo object will also be updated

bug

Most helpful comment

@ealves-pt but update is still called for foo, which should not be happening.

All 5 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lmnsg picture lmnsg  ·  3Comments

franciscolourenco picture franciscolourenco  ·  3Comments

fergaldoyle picture fergaldoyle  ·  3Comments

finico picture finico  ·  3Comments

julianxhokaxhiu picture julianxhokaxhiu  ·  3Comments