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

v-for different behavior in v1.0.18 from v1.0.20 #2573

Closed
zigomir opened this issue Mar 27, 2016 · 2 comments
Closed

v-for different behavior in v1.0.18 from v1.0.20 #2573

zigomir opened this issue Mar 27, 2016 · 2 comments

Comments

@zigomir
Copy link
Contributor

zigomir commented Mar 27, 2016

Vue.js version

1.0.20

Reproduction Link

1.0.20 http://codepen.io/zigomir/pen/ONgOLB

Steps to reproduce

Use v-if that references v-for variable before v-for in same element.

What is Expected?

I think v-for should work the same (v1.0.18 example http://codepen.io/zigomir/pen/GZEOKG
) since it's patch version bump and breaking changes aren't anticipated. This broke our production code when trying to upgrade vue. Although, how it's working now (1.0.20) makes more sense to me. Maybe it should just be mentioned in release notes and/or guides.

What is actually happening?

It doesn't work because now order matters. You need to update all v-for loops where variable is used before v-for is declared to make loop work.

@yyx990803
Copy link
Member

Hmm, this is an unintended change. I overlooked this when merging the terminal directive PR.

@yyx990803
Copy link
Member

Sorry about that! In the meanwhile you can build from source to get the fixed behavior.

This was referenced Mar 27, 2016
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