Skip to content
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

Multiple vue instance bug #3133

Closed
douzi8 opened this issue Jun 22, 2016 · 5 comments
Closed

Multiple vue instance bug #3133

douzi8 opened this issue Jun 22, 2016 · 5 comments
Assignees
Labels

Comments

@douzi8
Copy link

douzi8 commented Jun 22, 2016

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

@pespantelis
Copy link

Hi @douzi8,

I have checked your bin and the foo object remains the same as expected.

@simplesmiler
Copy link
Member

Interesting, looks like a bug to me.

@ealves-pt
Copy link

ealves-pt commented Jun 22, 2016

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'

@simplesmiler
Copy link
Member

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

@ealves-pt
Copy link

ealves-pt commented Jun 22, 2016

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants