Skip to content

Setting a property to an array after it was initialized to an empty object causes mayhem #869

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

Closed
dhruvio opened this issue May 27, 2015 · 2 comments

Comments

@dhruvio
Copy link

dhruvio commented May 27, 2015

Hi, thanks for your great work.

Have a look at this fiddle: https://jsfiddle.net/mjgd383x/4/

Imagine you create a Vue instance where some attribute in the data hash is initialized to an empty object. Then, the attribute is rewritten to an array full of data. One would expect directives like v-repeat (etc) to pick up on this. However, the bindings seem to get messed up and some directives don't work as expected.

The fiddle above should exemplify this issue.

Let me know if you need any further info.

-Dhruv

@yyx990803
Copy link
Member

The fix has landed in 0.12 beta, however in general I would advice against such usage; try to use consistent data format for the same v-repeat block.

@dhruvio
Copy link
Author

dhruvio commented May 27, 2015

Thanks

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

No branches or pull requests

2 participants